例:按两个字段排序:
// Obtain a list of columns
foreach ($data as $key => $row) {
$column_1[$key] = $row['column_1'];
$column_2[$key] = $row['column_2'];
}
// Sort the data with volume descending, edition ascending
array_multisort($column_1, SORT_ASC, $column_2, SORT_ASC, $data);
最新评论: