What is the fastest way to get the last key/value pair of an associative array in PHP? I know there are some wordy ways to do this. But what's the most concise and efficient way?
views:
33answers:
1
+3
A:
end($array); //value
current($array); //another way to get the last value after calling end
key($array); //key (after calling end)
Artefacto
2010-07-03 01:17:34