What will the $array array contain at the end of the execution of the following script?
$array = array ('1', '1');
foreach ($array as $k => $v) {
$v = 2;
}
array('1', '1')
Correct:
array('1', '1')
Answer B is correct. The foreach construct operates on a copy of $array and, therefore, no
changes are made to its original values.