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

<?php
$hots = array ( '8213' => 0, '8212' => 100, '8172' => 10008);
$key = array_search (max( $hots ), $hots );
echo $key ;
?>
 
运行结果为:8172

猜你喜欢

转载自www.cnblogs.com/bit5566/p/11324819.html
今日推荐