get first element of array php functuion code example
Example 1: get first key of array php
$firstKey = array_key_first($array);
Example 2: first item in array php
$firstItem = array_shift($array);
$firstKey = array_key_first($array);
$firstItem = array_shift($array);