note 57827 deleted from function.include by aidan
| From: | aidan@php.net | Date: | Sat, 15 Apr 2006 16:29:38 +0000 |
| Subject: | note 57827 deleted from function.include by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108151@lists.php.net to get a copy of this message | ||
Note Submitter: samba at wsu dot edu
----
I've been trying to figure out how to include files within a function and have them operate
within the global scope. Until now, I've been writing all my include files to work with
$GLOBALS['some_global_var']
... but I just realized that there's another way...
<?
foreach(array_keys($GLOBALS) as $index => $key){
eval("$key = & $GLOBALS[$key];");
}
?>
Please feel free to comment on this.