开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜