array headaches

From: Date: Wed, 21 Feb 2001 14:56:47 +0000
Subject: array headaches
Groups: php.general 
Request: Send a blank email to php-general+get-40957@lists.php.net to get a copy of this message
Hi could anybody please help me get my head around the following. I get some url information from the database (title, url) I am trying to then put this into an array so I can pass it to the page to display a menu. so a) how do I get the data into the array. would this be the way to do it?? $menu = array(); while($db->next_record()) { $menu[]["name"] = $db->f("name"); $menu[]["url"] = $db->f("topic_id"); } which leads me onto b) how do I get the data back out. I can't test to see if the above works as I can't get at the data TIA M@

« previous php.general (#40957) next »