array_pop

It pops the last  element of an array

Example

<?php
echo “<pre>”;
$array1 = array(2, 4,1, 3);
$array2 = array_pop($array1);
print_r($array2);
?>

Output

3


Share