Posted by harvey on 05/15/07 15:05
In article <1179239519.982538.109300@p77g2000hsh.googlegroups.com>,
zeldorblat@gmail.com says...
> $a = array('foo' => 'bar', 'baz' => 'bop');
> end($a); //set the pointer to the end of the array
> $lastKey = key($a);
> $lastValue = current($a);
>
>
Aha - I found end() in the docs but missed the key() command -
The above does the trick nicely for me
thank you.
Navigation:
[Reply to this message]
|