时间:2021-07-01 10:21:17 帮助过:9人阅读
array_multisort($volume,SORT_DESC,$data);$data[] = array('volume' => 67, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 1); $data[] = array('volume' => 85, 'edition' => 6); $data[] = array('volume' => 98, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 6); $data[] = array('volume' => 67, 'edition' => 7); foreach($data as $key=>$val){ $volume[$key] = $val['volume']; $edition[$key] = $val['edition']; } array_multisort($volume,SORT_DESC,$data);
相关推荐:
php实现二维数组快速排序算法的示例
PHP实现二维数组去重功能示例
以上就是php的二维数组排序的详细内容,更多请关注Gxl网其它相关文章!