按国家/地区按字母顺序按日期排序的最快方法是什么?:
Array
(
[JAPAN] => Array
(
[2010-10-17] => 2
)
[CUBA] => Array
(
[2010-10-16] => 9
)
[RUSSIAN FEDERATION] => Array
(
[2010-10-16] => 26
[2010-10-17] => 6
[2010-10-18] => 2
)
[CHINA] => Array
(
[2010-10-16] => 13
)
)
答案 0 :(得分:1)
foreach ($array as $value) {
ksort($value);
}
ksort($array);
array(4) {
["CHINA"]=>
array(1) {
["2010-10-16"]=>
int(13)
}
["CUBA"]=>
array(1) {
["2010-10-16"]=>
int(9)
}
["JAPAN"]=>
array(1) {
["2010-10-17"]=>
int(2)
}
["RUSSIAN FEDERATION"]=>
array(3) {
["2010-10-16"]=>
int(26)
["2010-10-17"]=>
int(6)
["2010-10-18"]=>
int(2)
}
}
答案 1 :(得分:0)