RE: [PHP] finding the index name of an associative array

From: Date: Sun, 01 Apr 2007 08:03:16 +0000
Subject: RE: [PHP] finding the index name of an associative array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-251876@lists.php.net to get a copy of this message
foreach ($myarray as $key => $value) { echo "$key = $value"; } > -----Original Message----- > From: news [mailto:news@sea.gmane.org] On Behalf Of Man-wai Chang > Sent: Sunday, April 01, 2007 3:59 AM > To: php-general@lists.php.net > Subject: [PHP] 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

« previous php.general (#251876) next »