Array_shift () move a cell at the beginning of the divisor group
function
The function will pop up and return the first cell of the array, and then subtract the length of the array by one
All numeric key names are changed to zero-based counting
Returns null if array is empty or not an array
"Scope of Use"
PhP4, PHP5.
Use
Mixed Array_shift (array &array)
array/Required/impending function processing array
Example
[PHP]
$array = Array (' Orange ', ' banana ', ' apple ');
Var_dump ($array);
Var_dump (Array_shift ($array));
Var_dump ($array);
/*
Array (3) {
[0]=>
String (6) "Orange"
[1]=>
String (6) "Banana"
[2]=>
String (5) "Apple"
}
String (6) "Orange"
Array (2) {
[0]=>
String (6) "Banana"
[1]=>
String (5) "Apple"
}
*/
Excerpts from Zuodefeng's notes
http://www.bkjia.com/PHPjc/478191.html www.bkjia.com true http://www.bkjia.com/PHPjc/478191.html techarticle Array_shift () removes a cell from the beginning of the array "function" the function pops up and returns the beginning of the array to a cell, and then the length of the arrays minus one of the number keys will be changed from ...