Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Mikhail Kovalev
March 26, 2008, 10:23 pm
rate this thread
For example if I have
$array = array(
'assd' => 21,
's9aso' => 1267,
2 => 129
And I need to access 2nd element in the array, not the element with
the key 2, but 's9aso' => 1267.
I know array_splice works that way, for example array_slice($array, 1)
will return two last elements, ie starting at 2nd element (id=1).
Is there a way to access an array that way, by some internal id number
which always starts at 0 etc? I could use array_keys to get
0 => 'assd',
1 => 's9aso',
2 => 2
But other than that?