如何在PHP中按降序排列[sequence_number]
以下數組?如何通過stdClass對象內的通用元素對stdClass對象的數組進行排序?
Array
(
[0] => stdClass Object
(
[debate_id] => 1
[stakeholder_id] => 1
[sequence_number] => 1
[title] => SLIDE 1 - STAKEHOLDER 1
[content] => This is the first slide for STAKEHOLDER 1
)
[1] => stdClass Object
(
[debate_id] => 1
[stakeholder_id] => 1
[sequence_number] => 4
[title] => SLIDE 2 - STAKEHOLDER 1
[content] => This is the second slide for STAKEHOLDER 1
)
[2] => stdClass Object
(
[debate_id] => 1
[stakeholder_id] => 1
[sequence_number] => 3
[title] => SLIDE 3 - STAKEHOLDER 1
[content] => This is the third slide for STAKEHOLDER 1
)
)