I'm not able to select my popular.
Below is my code:
<select>
<option>Selecione</option>
<?php while($serv = mysql_fetch_array(getAllServicos())) { ?>
<option value="<?php echo $serv['Codigo'] ?>"><?php echo $serv['Descricao'] ?></option>
<?php } ?>
</select>
getAllServices () function:
function getAllServicos(){
$database = open_database();
$sql = "SELECT Codigo, Descricao FROM 'tblservico' WHERE 'Status' = true";
$result = $database->query($sql);
if ($result->num_rows > 0) {
$found = $result->fetch_all(MYSQLI_ASSOC);
}
close_database($database);
return ($found);
}
Error:
Warning: mysql_fetch_array () expects parameter 1 to be resource, array given in