I have an array that is structured like this:
[33] => Array ( [time] => 1285571561 [user] => test0 ) [34] => Array (
As the key is needed, the accepted solution doesn't work.
This:
end($array); return array(key($array) => array_pop($array));
will return exactly as the example in the question.