How do I sort the following array?

后端 未结 3 507
旧时难觅i
旧时难觅i 2020-12-07 06:17

I have this array:

  Array
(
[0] => Array
    (
        [id] => 6347
        [lat] => 18.520430
        [lng] => 73.856743
        [country_id] =         


        
3条回答
  •  孤街浪徒
    2020-12-07 06:41

    Use the SET class in cake

    $result = Set::sort($yourArray, '{n}.avgRate', 'desc');
    

提交回复
热议问题