Fetching all parts of an array
Posted: Thu Aug 30, 2007 1:50 pm
I have this piece of code, based on this tutorial viewtopic.php?t=60287.
I've only changed the "Music" line. I want to list all the results found from the query, but only the second result of the array is being displayed. What am I doing wrong?
Code: Select all
$musiclist=mysql_query("SELECT subcat FROM subcat WHERE category='Music' ORDER BY subcat");
$sublist=array(1=>array('Anna','Andrew','Andrea','Annakin'),
2=>array('Bill','Bob','Bernie'),
3=>array('Charles','Camila','Connie','Constance'),
'Music'=>mysql_fetch_array($musiclist),
5=>array('Edmund','Edgar','Elisabeth','Eugene','Emma','Emily'));