Shift an element off the beginning of array
Syntax
array_shift ( array &$array ) : mixed
Parameters
array
The input array.
Return
Returns the shifted value, or NULL if array is empty or is not an array.
Examples
<? $array = array("orange", "banana", "apple", "raspberry"); $return = array_shift($array); print_r($return); ?>
orange