关于foreach遍历数组,阅读下面的代码,输出结果正确的是( )。$arr=array(1,2);foreach($arras$v){++$v;}print_r($arr);
A.正确答案AArray ( [0] => 1 [1] => 2 )
B.Array ( [0] => 2 [1] => 3 )
C.Array ( [1] => 1 [2] => 2 )
D.Array ( [0] => 3 )
关于foreach遍历数组,阅读下面的代码,输出结果正确的是( )。$arr=array(1,2);foreach($arras$v){++$v;}print_r($arr);
A.正确答案AArray ( [0] => 1 [1] => 2 )
B.Array ( [0] => 2 [1] => 3 )
C.Array ( [1] => 1 [2] => 2 )
D.Array ( [0] => 3 )