I’m wondering if someone can explain or help me find out why this happens:
[php]$array1 = array(array(1, 2, 3));
$array2 = &$array1[0];
$array3 = $array1;
$array3[0][0] = 0;
print_r($array1);[/php]
Output:
[code]Array
(
[0] => Array
(
[0] => 0
[1] => 2
[2] => 3
)
)[/code]
I’ve since worked around this problem, but I’d still like to know why it happens.
Thanks in advance.