我有一个非常大的数组,其中包含以下数据:
Array
(
[2] => Array
(
[Berlin] => Array
(
[1] => Array
(
[0] => stdClass Object
(
[name] => Joe
[car_name] => Audi
[car_color] => Black
[sid] => 130
)
[1] => stdClass Object
(
[name] => Mark
[car_name] => BMW
[car_color] => Red
[sid] => 135
)
)
[0] => Array
(
[0] => stdClass Object
(
[name] => Lucas
[car_name] => Audi
[car_color] => Yellow
[sid] => 168
)
[1] => stdClass Object
(
[name] => Joe
[car_name] => Volkswagen
[car_color] => Black
[sid] => 170
)
[2] => stdClass Object
(
[name] => Thomas
[car_name] => Ford
[car_color] => Gray
[sid] => 119
)
)
)
[Moscow] => Array
(
[1] => Array
(
[0] => stdClass Object
(
[name] => Matt
[car_name] => Mustang
[car_color] => Black
[sid] => 230
)
[1] => stdClass Object
(
[name] => Suze
[car_name] => Lada
[car_color] => Red
[sid] => 245
)
)
[0] => Array
(
[0] => stdClass Object
(
[name] => Lucas
[car_name] => Unknown
[car_color] => Brown
[sid] => 374
)
[1] => stdClass Object
(
[name] => Mathew
[car_name] => Volkswagen
[car_color] => Blue
[sid] => 589
)
[2] => stdClass Object
(
[name] => Thomas
[car_name] => Ford
[car_color] => Light Blue
[sid] => 741
)
)
)
)
)
现在我想这样排序(请阅读这些//
行):
Array
(
[2] => Array //from min to max - eg. from 0 to 50
(
[Berlin] => Array //alphabetically from A to Z
(
[1] => Array //from min to max eg. from 0 to 1
(
)
)
)
)
我怎样才能在 PHP 中实现这一点?我希望我足够清楚,请随时在评论中询问更多信息。