array_shift() removes the first element from an array, and returns its value (but not its key).
To use it, pass the array in question to array_shift() :
<?php $myBook = array("title"=> "Java", "author"=> "John A", "pubYear"=> 2018); echo array_shift($myBook)."\n"; print_r($myBook);/*ww w . j av a 2 s .co m*/ ?>