foreach ($myarray as $key => $value) { echo "$key = $value"; } > -----Original Message----- > From: news [mailto:news@xxxxxxxxxxxxx] On Behalf Of Man-wai Chang > Sent: Sunday, April 01, 2007 3:59 AM > To: php-general@xxxxxxxxxxxxx > Subject: finding the index name of an associative array > > myarray=array() > myarray['a']=1 > myarray['b']=1 > myarray['c']=1 > > Is there an iterative way to find out the array index values ('a', 'b' > and 'c') of myarray? > > -- > .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org > / v \ Simplicity is Beauty! May the Force and Farce be with you! > /( _ )\ (Ubuntu 6.10) Linux 2.6.20.4 > ^ ^ 15:58:01 up 8 days 3:10 0 users load average: 1.00 1.00 1.00 > news://news.3home.net news://news.hkpcug.org > news://news.newsgroup.com.hk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.23/740 - Release > Date: 3/30/2007 1:15 PM > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 3/30/2007 1:15 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php