Mega Code Archive

 
Categories / Php / Data Type
 

Array_shift() function operates much like array_pop()

//array_shift() function removes one element from the left side of the array.  //All remaining array elements are shifted one unit toward the left side of the array.  //array_shift() has the same syntax as array_pop(): <?     $languages = array("Spanish", "English", "French", "Russian");     $a_language = array_shift($languages);      print_r($a_language); ?>