我需要对多维数组进行排序,并根据最高到最低显示值。我该怎么做?
$array[0][0] = "section1";
$array[0][1] = 3;
$array[1][0] = "section2";
$array[1][1] = 1;
$array[2][0] = "section3";
$array[2][1] = 2;
echo "<pre>";
print_r($array);
echo "</pre>";
结果:
section1
3
section2
1
section3
2
需要结果:
section1
3
section3
2
section2
1