note 99532 deleted from language.references.arent by danbrown
| From: | danbrown@php.net | Date: | Mon, 23 Aug 2010 15:45:58 +0000 |
| Subject: | note 99532 deleted from language.references.arent by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171949@lists.php.net to get a copy of this message | ||
Note Submitter: northhero at gmail dot com
----
In response to mstasak at access4less dot net, in fact just assign the reference of one element to
another variable will change the element value to itself reference.
unset($a);
unset($b);
$a[1]=1;
$tmp=&$a[1];
$b=$a;
$b[1]=7;
print_r($a); //output is 7
print_r($b); //output is 7