$row) { foreach ($row as $key => $value) { $arrSort[$key][$uniqid] = $value; } } array_multisort($arrSort[$field], constant($sort), $array); return $array; } $arr=[ ['goods_name'=>'商品1','price'=>86], ['goods_name'=>'商品2','price'=>89.8], ['goods_name'=>'商品3','price'=>45], ['goods_name'=>'商品4','price'=>53] ]; $new=arraySequence($arr,'price');