两个数组如何排序一样?比如:$a=[1,2,3]; $b=[3,2,1];问题:如何把$b弄的和$a一样------解决方案-------------------- PHP code$a = array(1,2,3);$b = array(3,2,1);foreach($a as $v) $r[] = array_search($v, $b);array_multisort($r, $b);print_r($b); 로그인 후 복사