get array first element and key php code example
Example 1: get first key of array php
$firstKey = array_key_first($array);
Example 2: get first element of array php
array_values($array)[0];
$firstKey = array_key_first($array);
array_values($array)[0];