<snip>
The question is the - the assigned string key - is there a way to
retrieve
that in a loop?  Foreach, for, while or otherwise?
</snip>

I think this is what you want.

http://www.php.net/manual/en/control-structures.foreach.php

foreach(array_expression as $value) statement
foreach(array_expression as $key => $value) statement

The first form loops over the array given by array_expression. On each
loop, the value of the current element is assigned to $value and the
internal array pointer is advanced by one (so on the next loop, you'll
be looking at the next element).

The second form does the same thing, except that the current element's
key will be assigned to the variable $key on each loop. 

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

Reply via email to