function displayLanguages() { $html = NULL; $conn = parent::GetPDOConn(); if (conn != null) { $stmt = $conn->prepare("SELECT lang FROM `langs` ORDER BY `lang` ASC"); if ($stmt->execute()) { while ($res = $stmt->fetch()) { $html .= "<option>" . $res['lang'] . "</option>"; } } } else { parent::addError("Server error - Could not connect to the database"); } return $html; }