php array first element key code example Example: get first key of array php $firstKey = array_key_first($array);