PHP获取数组最大值下标的方法

<?php
$hots = array('8213'=> 0,'8212'=> 100,'8172'=> 10008);
$key = array_search(max($hots),$hots);
echo $key;
?>
 
运行结果为:8172
原文地址:https://www.cnblogs.com/bit5566/p/11324819.html