PHP получить наибольшее значение ключа
$arr = array( 1 => "A", 10 => "B", 5 => "C" );
max(array_keys($arr));
Exyrui
$arr = array( 1 => "A", 10 => "B", 5 => "C" );
max(array_keys($arr));
$array = array(0 => "-1121", 1 => "-1605", 2 => "100", 3 => "55");
echo max(array_keys($array)); ///OUTPUT: 3