我正在用键值对数组进行排序。使用以下数组,我需要按site_category对其进行排序,并且我需要像这样的输出
例子:
Shopping
Amazon
Social
Amoeblo
American express
数组值为
(
[0] => stdClass Object
(
[site_id] => 1
[site_name] => Amazon
[site_img] => http://localhost/faves/resource/img/sites/icon/amazon.png
[site_category] => Shopping
)
[1] => stdClass Object
(
[site_id] => 2
[site_name] => Ameblo
[site_img] => http://localhost/faves/resource/img/sites/icon/ameblow.png
[site_category] => Social
)
[2] => stdClass Object
(
[site_id] => 3
[site_name] => American Express
[site_img] => http://localhost/faves/resource/img/sites/icon/americanexpress.png
[site_category] => Social
)
)
有什么建议可以解决这个问题吗?