get first entry of array php code example
Example 1: php array get first x elements
$sliced_array = array_slice($array, 0, 5)
Example 2: first item in array php
$firstItem = array_shift($array);
$sliced_array = array_slice($array, 0, 5)
$firstItem = array_shift($array);