Re: finding the index name of an associative array
| From: | Myron Turner | Date: | Mon, 02 Apr 2007 00:47:18 +0000 |
| Subject: | Re: finding the index name of an associative array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251905@lists.php.net to get a copy of this message | ||
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 the keys, numeric and string, from the /input/
array.
http://www.php.net/manual/en/function.array-keys.php
--
_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/