1:创建二维数组
$data = array(); $data[$j]['teacher_id'] = $teacher_id; $data[$j]['total_score'] = $total_score;
2:数组排序
foreach ($data as $key => $row) { $volume[$key] = $row['total_score']; $edition[$key] = $row['teacher_id']; } array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data);
3排序前后对比
排序前 排序后