note 47914 deleted from language.variables.scope by sean
| From: | sean@php.net | Date: | Sun, 05 Dec 2004 14:37:55 +0000 |
| Subject: | note 47914 deleted from language.variables.scope by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81396@lists.php.net to get a copy of this message | ||
Note Submitter: adam.pippin at accesscomm dot ca
----
The last code I posted only copied the variables into the local function, by replacing the foreach
block in that code with the following one, a reference is created so the variable can be modified
inside the function and retain its value outside of the function.
<?php
foreach ($GLOBALS as $key=>$value)
{
$$key = & $GLOBALS[$key];
}
?>