views:

33

answers:

1

What is the fastest way of sorting this both alphabetically by country and numerically by date?:

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
    )

)
A: 

You will have to benchmark on more data. I'd try ksort for sorting by countries and usort for sorting by dates.

kovshenin