编程爱好者之家
//按照病案号顺序升序排列 function array_sort($array,$keys){ $new_array= array(); $sort_array = array(); foreach($array as $key=>$val){ foreach($val as $k=>$v){ $sort_array[$key] = $v[$keys]; } } asort($sort_array);//降序使用 arsort(); reset($sort_array); foreach ($sort_array as $k => $v) { $new_array[] = $array[$k]; } return $new_array; } $ret = array_sort($ret,'1');