Sets an array pointer to the last element.
The internal pointer of an array is set to the last element with this function. end() also returns the last element.
<?php
$array1 = array("one", "two", "three");
print end($array1) . " " . current($array1);
?>three threeThe last element of an array is printed by using the end() function. To show that the pointer has also moved, the element returned by current() is also printed.