$data = array( [0] => array( "foo" => 10, "bar" => 5, "hoge" => 7 ), [1] => array( "foo" => 8, "bar" => 6, "hoge" => 1 ), [2] => array( "foo" => 10, "bar" => 5, "hoge" => 7 ) );
foo列でソートする場合
foreach($data as $key => $row){ $foo[$key] = $row["foo"]; } array_multisort($foo,SORT_DESC,$data);
foo,bar,hogeでソートしたい場合
foreach($data as $key => $row){ $foo[$key] = $row["foo"]; $bar[$key] = $row["bar"]; $hoge[$key] = $row["hoge"]; } array_multisort($foo,SORT_DESC,$bar,SORT_DESC,$hoge,SORT_DESC,$data);
素晴らしすぎる!