"Cat",2=>"Horse",3=>"Bird");for ($i = 0; $i "/> "Cat",2=>"Horse",3=>"Bird");for ($i = 0; $i ">
我想问一下以下这段代码为什么会输出这样的结果?不是应该全部为空吗?
<br />$a1=array(0=>"Dog",1=>"Cat",2=>"Horse",3=>"Bird");<br />for ($i = 0; $i < count($a1); $i++) {<br /> array_splice($a1,$i, 1);<br />}<br />print_r($a1);<br />