string(1) "2" } [1] => array(1) {">
时间:2021-07-01 10:21:17 帮助过:7人阅读
$ar = array ( 0 => array ( "id" => "2" ), 1 => array ( "id" => "2" ), 2 => array ( "id" => "1" ), 3 => array ( "id" => "1" ),);$arr = array();foreach($ar as $v){ if(!isset($arr[$v['id']])) $arr[$v['id']] = $v;}ksort($arr);print_r(array_values($arr));