In PHP I have a two-dimensional array called $listing that will contain data with the following structure:
(
[1] => Array
(
[category] => tech
[business_name] => Apple
)
[2] => Array
(
[category] => food
[business_name] => McDonalds
)
[3] => Array
(
[category] => tech
[business_name] => Dell
)
)
I want to output this in plain text grouped by category (ordered alphabetically) and then *business_name* (ordered alphabetically). Note that this is just a subset of how this will display - there could be 50 categories and 1000's of listings - so the code needs to take that into account.
So using the output for $listing as outlined above I would need it to output like the following:
category: food
business_name: McDonalds
category: tech
business_name: Apple
business_name: Dell
Please Help. Thanks in advance.