What will the $array array contain at the end of this script?
<code>
1 <?php
2 function modifyArray (&$array)
3 {
4 foreach ($array as &$value)
5 {
6 $value = $value + 1;
7 }
8
9 $value = $value + 2;
10 }
11
12 $array = array (1, 2, 3);
13 modifyArray($array);
14 ?>
</code>
A.
2, 3, 4
B.
2, 3, 6
C.
4, 5, 6
D.
1, 2, 3
I agree with the answer. B
0
0