$data = Array (
[0] => stdClass Object ( [ID] => 1 [top_level] => gold [sub_level] => coal )
[1] => stdClass Object ( [ID] => 3 [top_level] => bronze [sub_level] => dirt )
[2] => stdClass Object ( [ID] => 4 [top_level] => silver [sub_level] => aluminum )
)
使用PHP,我如何通过[sub_level]升序(或降序)来排序以产生以下内容?
Array (
[0] => stdClass Object ( [ID] => 4 [top_level] => silver [sub_level] => aluminum )
[1] => stdClass Object ( [ID] => 1 [top_level] => gold [sub_level] => coal )
[2] => stdClass Object ( [ID] => 3 [top_level] => bronze [sub_level] => dirt )
)
此外,搜索[sub_level]特定值的最有效方法是什么?