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

2007-04-01 Thread Myron Turner
Man-wai Chang wrote: > 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? > > array *array_keys* ( array $input [, mixed $search_value [, bool $strict]] ) *array_keys()* returns th

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

2007-04-01 Thread Jake McHenry
foreach ($myarray as $key => $value) { echo "$key = $value"; } > -Original Message- > From: news [mailto:[EMAIL PROTECTED] 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

[PHP] finding the index name of an associative array

2007-04-01 Thread Man-wai Chang
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! /( _