end: Set the internal pointer of an array to its last element
<?php $fruits = array("apple", "orange", "banana"); print_r($fruits); $fruit = current($fruits); // returns "apple" echo "Current: $fruit<br />"; $fruit = end($fruits); // returns "banana" echo "End: $fruit<br />"; ?>