Get last key-value pair in PHP array -


i have array structured this:

[33] => array     (         [time] => 1285571561         [user] => test0     )  [34] => array     (         [time] => 1285571659         [user] => test1     )  [35] => array     (         [time] => 1285571682         [user] => test2     ) 

how can last value in array, maintaining index [35]?

the outcome looking this:

[35] => array     (         [time] => 1285571682         [user] => test2     ) 

try use

end($array); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -