PHP array to obtain the maximum value of the subscript method

<?php
$hots = array ( '8213' => 0, '8212' => 100, '8172' => 10008);
$key = array_search (max( $hots ), $hots );
echo $key ;
?>
 
Run results: 8172

Guess you like

Origin www.cnblogs.com/bit5566/p/11324819.html