> 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..

Maybe this will help:

> $my_array = array('bob' => $x,  'jim' => $y, 'mike' => $z);

$keys = array_keys($my_array);

print $keys[0]; // bob
print $keys[1]; // jim

Philip Olson

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to