The fastest way to get the last key/value pair of an associative array in PHP?
What is the fastest way to get the last key/value pair of an associative array in PHP? I know there are some开发者_如何学Go wordy ways to do this. But what's the most concise and efficient way?
end($array); //value
current($array); //another way to get the last value after calling end
key($array); //key (after calling end)
精彩评论