Given the following PHP array:
Array
(
[0] => Array
(
[name] => Restaurant 123
[city] => Arlington
[zip] => 22201
)
[1] => Array
(
[name] => Bar Foo
[city] => Ballston
[zip] => 22201
)
[2] => Array
(
[name] => Restaurant XYZ
[city] => Ballston
[zip] => 22201
)
[3] => Array
(
[name] => Restaurant 321
[city] => Washington DC
[zip] => 22201
)
)
How can I produce a list sorted according to city (alphabetically), so that it would output something like:
Arlington
Restaurant 123
Ballston
Bar Foo
Restaurant XYZ
Washington DC
Restaurant 321
E.G., sorted first by city name alphabetically, and then by venue name, also alphabetically. Also note that it's not given that the restaurant name, nor the cities are alphabetically sorted in the array given.