У меня есть действительно большой массив, содержащий следующие данные:
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? Надеюсь, я был достаточно ясен, не стесняйтесь спрашивать в комментариях дополнительную информацию.