How to sort an array of objects based on the values of one of the properties?

For example, there is a array of objects:
[0] => stdClass Object
(
 [prop1] => 25
 [prop2] => 3143413
 [prop3] => array(
 'arr_prop1' => '54353',
 'arr_prop2' => '2423',
 'arr_prop3' => '2343'
)
)
[1] => stdClass Object
(
 [prop1] => 25
 [prop2] => 3146280
 [prop3] => array(
 'arr_prop1' => '54354',
 'arr_prop2' => '123',
 'arr_prop3' => '634'
)
)
[2] => stdClass Object
(
 [prop1] => 24
 [prop2] => 3149972
 [prop3] => array(
 'arr_prop1' => '342',
 'arr_prop2' => '123',
 'arr_prop3' => '543'
)
)
[3] => stdClass Object
(
 [prop1] => 24
 [prop2] => 3162714
 [prop3] => array(
 'arr_prop1' => '12',
 'arr_prop2' => '54',
 'arr_prop3' => '754'
)
)

how to sort by value 'arr_prop1'?
April 7th 20 at 15:25
1 answer
April 7th 20 at 15:27

Find more questions by tags PHP