Javatpoint Logo
Javatpoint Logo

PHP array_key_last() function

The array_key_last( ) function is used to get the last key of an array. This function was introduced in PHP 7.3.0



Parameter Description Is compulsory
array Specifies the array. compulsory

Return Values

The array_key_last( ) function returns the last key of the array if the array is not empty, otherwise null.

IMPORTANT NOTE- The above two functions are introduced in PHP 7.3.0 that is not released officially that's why example is not given in the above functions.

Help Others, Please Share

facebook twitter pinterest