array_shift( ) function returns the value from the front of the array while also removing it from the array.
<? $names = array("Johnny", "Timmy", "Bobby", "Sam", "Tammy", "Joe"); $firstname = array_shift($names); // "Johnny" var_dump($names); ?>