quick question… my sql query is spitting out this data…
Array ( [id] => 1 [name] => Test Name [text] => This is text [image] => image.jpg )
When there are two rows of data, is there something wrong with my php code?
$query = "SELECT id, name, text, image FROM categories";
$results = mysql_query($query, $connection);
$results = mysql_fetch_assoc($results);
mysql_fetch_assocfetches one row at a time. You need to loop over the result set:From the docs (search is your friend):
Cheers