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
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 name of an associative array
>
2 matches
Mail list logo