Exam4Training

What will the $array array contain at the end of this script?

What will the $array array contain at the end of this script?

function modifyArray (&$array)

{

for each ($array as &$value)

{

$value= $value+ 1;

$value= $value+ 2;

$array= array (1, 2, 3);

modifyArray($array);
A . 2, 3, 4
B . 2, 3, 6
C . 4, 5, 6
D . 1, 2, 3

Answer: B

Exit mobile version