オブジェクトの配列があるとしましょう:
Array (
[0] => stdClass Object (
[id] => 1
[name] => product_1
[cost] =>9.99
)
[1] => stdClass Object (
[id] => 2
[name] => product_2
[cost] =>2.99
)
[2] => stdClass Object (
[id] => 3
[name] => product_3
[cost] =>4.99
)
[3] => stdClass Object (
[id] => 4
[name] => product_4
[cost] =>1.99
)
[4] => stdClass Object (
[id] => 5
[name] => product_5
[cost] =>0.99
)
)
コストが最も低いものから最も高いものの順に並べたいのですが、配列の最初の要素の[name]は「product_3」である必要があります。