Robert Cummings wrote:
To answer his question though, variables not declared via the "global" keyword and not accessed via the super global variables ($GLOBALS, $_SESSION, etc) inherit the scope in which the include statement occurs. Therefore, if in the included file all you have is: $foo = 'foo'; Then it's scope is the function including the file.
It's important to have this clear in your head when dealing with included files, so I wrote an example that will hopefully demonstrate it for the OP...
http://dev.stut.net/php/scope/ -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php