php return first element of array if has code example Example: first item in array php $firstItem = array_shift($array);