note 78421 rejected from language.references by nlopess

From: Date: Thu, 11 Oct 2007 10:10:33 +0000
Subject: note 78421 rejected from language.references by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-131300@lists.php.net to get a copy of this message
Note Submitter: yarco dot w at gmail dot com ---- Well, I'm very pleased to share my knowledge on reference and array. What do you think the following code? <?php $array1 = array(1 => 'One', 2 => 'Two_Will_Be_Changed', 3 => 'Three'); // $p = & $array1[2]; line 1 $array2 = $array1; // $p = & $array1[2]; line 2 $array2[2] = 'Changed'; print_r($array1); print_r($array2); ?> The result of the code? If uncomment line 1, the result of the code? And if line2? So, now you know what i'm saying, are you?

« previous php.notes (#131300) next »