1, 'name' => "语文", 'listorder' => 2 ), array( 'id' => 2, 'name' => "数学", 'listorder' => 4 ), array( 'id' => 3, 'name' => "英语", 'listorder' => 1, 'sun' => array( array( 'id' => 6, 'name' => "生物", 'listorder' => 7 ), ) ), array( 'id' => 4, 'name' => "生物", 'listorder' => 7 ), array( 'id' => 5, 'name' => "化学", 'listorder' => 0 ), array( 'id' => 7, 'name' => "英语", 'listorder' => 1, 'sun' => array( array( 'id' => 8, 'name' => "生物", 'listorder' => 7 ), ) ),);$sort = array( 'direction' => 'SORT_DESC', //排序顺序标志 SORT_DESC 降序;SORT_ASC 升序 'field' => 'listorder', //排序字段 ); $arrSort = array(); foreach($array AS $uniqid => $row){ foreach($row AS $key=>$value){ $arrSort[$key][$uniqid] = $value; } } if($sort['direction']){ array_multisort($arrSort[$sort['field']], constant($sort['direction']), $array ); } print_r($array );