> -----Original Message----- > From: PHP List [mailto:php_list@;ibcnetwork.net] > Sent: 28 October 2002 22:48 > To: php > Subject: [PHP] Array Question > > > Hi, > Lets say I have a simple array like this: > $myarray = array("a"=>"b","d"=>"c"); > > echo $myarray[0] will return 'b'; > > How can I get the name of the index? so:
I'd suggest a look at array_keys() (http://www.php.net/manual/en/function.array-keys.php). Seems to be the nearest to what you want. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php