mixed array_shift
(array array);array_shift() shifts the first value of the array off and returns it, shortening the array by one element and moving everything down.
Example 1. array_shift() example $args = array("-v", "-f"); $opt = array_shift($args); |
See also array_unshift(), array_push(), and array_pop().
Note: This function was added in PHP 4.0.