我有一个带有一堆键的数组。我想按它们的值对其中一个键进行排序。
Array (
[0] => stdClass Object (
[id] => 1
[question] => Action
[specific_to_movie_id] => 1
[total_yes] => 4 )
[1] => stdClass Object (
[id] => 2
[question] => Created by DC Comics
[specific_to_movie_id] => 1
[total_yes] => 1 )
[2] => stdClass Object (
[id] => 3
[question] => Christian Bale
[specific_to_movie_id] => 1
[total_yes] => 1 )
)
数组看起来像上面那样,我想按“Total_yes”排序
我该如何在 PHP 中执行此操作?