这是我的代码:
上述代码的输出结果为:
为什么第二个数组的排序是不正确的?如果它是正确的,是否有人可以解释一下为什么是正确的?
谢谢。
$numbers = array(10, 100, 100, 0);
$names = array("Alex", "Jane", "Amanda", "Debra");
array_multisort($numbers, $names);
print_r($numbers);
print_r($names);
上述代码的输出结果为:
Array
(
[0] => 0
[1] => 10
[2] => 100
[3] => 100
)
Array
(
[0] => Debra
[1] => Alex
[2] => Amanda
[3] => Jane
)
为什么第二个数组的排序是不正确的?如果它是正确的,是否有人可以解释一下为什么是正确的?
谢谢。