update page now
Longhorn PHP 2026 - Call For Papers

Voting

: zero plus eight?
(Example: nine)

The Note You're Voting On

Anonymous
14 years ago
Similarly, if you want the last value without affecting the pointer, you can do:

<?php

$array = array("one","two","three");

echo next($array); // "two"

$last = array_pop(array_keys(array_flip($array)));

echo $last;  // "three"

echo current($array); // "two"

?>

<< Back to user notes page

To Top