Re: Array question - Finding the name
| From: | Jason Wong | Date: | Fri, 07 Jun 2002 17:10:07 +0000 |
| Subject: | Re: Array question - Finding the name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101142@lists.php.net to get a copy of this message | ||
On Friday 07 June 2002 23:59, Phil Schwarzmann wrote:
> Thanks for your reply!
>
> I tried using array_slice but I don't think that's exactly that I want
> to do.
>
> I want to find the name of the n-th value in an array. Not the value of
> the n-th, but whatever name was given to it. Array_slice seems to just
> pull part of an array and put it in another. and key() isn't exactly
> what i want either..
list($key, $val) = each(array_slice($my_array, 1, 1))
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Absence is to love what wind is to fire. It extinguishes the small,
it enkindles the great.
*/