note 28178 added to migration4.variables
| From: | Payson at rack1 dot php dot net | Date: | Sat, 04 Jan 2003 22:16:59 +0000 |
| Subject: | note 28178 added to migration4.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41672@lists.php.net to get a copy of this message | ||
Just a quick note on passing and including.
If you have a top level script with several levels of includes you must declare any global variables
that you want the included files to be able to see BEFORE your include statements.
global $var;
$var = 5;
include("file.php");
If you try to change the variable AFTER you have included the file it appears the changes will not
be reflecated inside of the included file.
(I could be wrong I don't have the most current version of PHP)
-two|face
zulu_gold@hotmail.com
--
http://www.php.net/manual/en/migration4.variables.php
http://master.php.net/manage/user-notes.php?action=edit+28178
http://master.php.net/manage/user-notes.php?action=delete+28178
http://master.php.net/manage/user-notes.php?action=reject+28178