1 $worderData = [ 2 [ 3 'id'=>1, 4 'name'=>'张三', 5 'distance'=>0.1, 6 ], 7 [ 8 'id'=>2, 9 'name'=>'李四', 10 'distance'=>2.5, 11 ], 12 [ 13 'id'=>3, 14 'name'=>'小明', 15 'distance'=>0.8, 16 ] 17 ]; 18 $order_arr = array_column($worderData, 'distance'); 19 array_multisort($order_arr, SORT_ASC, $worderData); 20 return $worderData;