array_key_last

(PHP 7 >= 7.3.0)

array_key_lastGets the last key of an array

说锟斤拷

array_key_last ( array $array ) : mixed

Get the last key of the given array without affecting the internal array pointer.

锟斤拷锟斤拷

array

An array.

锟斤拷锟斤拷值

Returns the last key of array if the array is not empty; NULL otherwise.

锟轿硷拷

  • array_key_first() - Gets the first key of an array
  • end() - 锟斤拷锟斤拷锟斤拷锟斤拷诓锟街革拷锟街革拷锟斤拷锟斤拷一锟斤拷锟斤拷元