资助几个函数来对数组进行排序,但如果它们是 stdClass 对象,它们都不能对它们进行排序,或者至少我找不到合适的
我需要通过排序值对这个数组进行排序
[data] => Array
(
[0] => stdClass Object
(
[id] => 12
[name] => Title1
[ordering] => 1
)
[1] => stdClass Object
(
[id] => 14
[name] => Title2
[ordering] => 3
)
[2] => stdClass Object
(
[id] => 18
[name] => Title4
[ordering] => 2
)
[3] => stdClass Object
(
[id] => 22
[name] => Title5
[ordering] => 4
)
)
任何帮助表示赞赏。谢谢!