end

It sets the internal pointer of an array to its last element

Example

<?php
$array = array(“php”, “asp”, “jsp”, “as”, “js”);
echo end($array);
?>

Output

js

Share