时间:2021-07-01 10:21:17 帮助过:17人阅读
$arr = array( array('a'=>33,'b'=>32,'c'=>12), array('a'=>33,'b'=>32,'c'=>13), array('a'=>33,'b'=>32,'c'=>11) ); usort($arr, 'sortByC'); function sortByC($a, $b) { return $a['c'] - $b['c']; } echo ''; print_r($arr);
------解决方案--------------------
foreach($arr as $v) $t[]=$v['c']; array_multisort($t,$arr); print_r($arr);