PHP 按两个字段值排序数组
我有一个这样的数组
Array ( [0] => Array( "destination" => "Sydney", "airlines" => "airline_1", "one_way_fare" => 100, "return_fare => 300 ), [2] => Array( "destination" => "Sydney", "airlines" => "airline_2", "one_way_fare" => 150, "return_fare => 350 ), [3] => Array( "destination" => "Sydney", "airlines" => "airline_3", "one_way_fare" => 180, "return_fare => 380 ) )
如何按return_fare asc , one_way_fare asc 对值进行排序?
我尝试array_multisort()但我最终得到了混淆的数据。
asort仅适用于一维数组,我需要按两个值或更多值进行排序,我如何实现像SQL,按字段1 asc排序,字段2 asc?