源代码:
"red","1"=>"green"); $a2=array("0"=>"purple","1"=>"orange"); array_splice($a1,1,0,$a2); print_r($a1); ?>
运行结果:
Array ( [0] => red [1] => purple [2] => orange [3] => green )