如果我有一个包含这样的对象的数组:
Array
(
[0] => stdClass Object
(
[img] => image1.jpg
[order] => 1
)
[1] => stdClass Object
(
[img] => image2.jpg
[order] => 3
)
[2] => stdClass Object
(
[img] => image3.jpg
[order] => 2
)
[3] => stdClass Object
(
[img] => image4.jpg
[order] => 4
)
)
然后如何按对象“顺序”值对数组进行排序?在这种情况下,顺序应该是:image1.jpg、image3.jpg、image2.jpg、image4.jpg。