$ data = array (array ('amount' => '98 .60 ',' typeA '=> '98 .52', 'typeB' => '58 .52 ',' typeC '=> '90 .2'), array ('quantity' = > '55 .80 ',' typeA '=> '25 .36', 'typeB' => '36 .54 ',' typeC '=> '36 .99'), array ('amount' => '42 .68 ',' typeA '=>' 64.26 ',' typeB '=> '65 .87', 'typeC' => '99 .24 '), array (' amount '=>' 812.3 ',' typeA '=> '36 .27', 'typeB' => '23 .25 ' , 'typeC' => '94 .35 '));
// Get a list of columns
foreach ($ data as $ key => $ row) {
$volume[$key] = $row['typeA']; $edition[$key] = $row['typeB']; $edition1[$key] = $row['typeC'];
}
array_multisort ($ volume, SORT_DESC, $ edition, SORT_DESC, $ edition1, SORT_DESC, $ data);
echo ''; print_r ($ data);
source share