Possible Duplicate:
PHP: Warning: sort() expects parameter 1 to be array, resource given
I keep getting this weird error. Yet when I check it, it seems fine.
$stuff=mysql_query('SELECT id, name FROM albums');
$albums_list='';
print_r($stuff);
while ($row=mysql_fetch_array($stuff))
{
print_r($row);
$albums_list .= "<option value=" . $row[0]['id'] . ">" . $row[0]['name'] . "</option>\n";
}
The print_r($stuff); returns
CI_DB_mysql_result Object (
[conn_id] => Resource id #37
[result_id] => Resource id #74
[result_array] => Array ( )
[result_object] => Array ( )
[current_row] => 0
[num_rows] => 1
[row_data] =>
)