RE: [PHP] globals not working?
| From: | Jon Haworth | Date: | Fri, 04 Oct 2002 17:22:13 +0000 |
| Subject: | RE: [PHP] globals not working? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118893@lists.php.net to get a copy of this message | ||
Hi Paul,
> function testGlobal() {
> global $evtredir_site;
>
> echo "TestGlobal: '$evtredir_site'<br>\n";
> }
>
> When I do "testGlobal();" I get:
>
> TestGloal: ''
Change this function to:
function testGlobal() {
global $evtredir_site;
echo "TestGlobal: ". $evtredir_site. "<br>\n";
}
Cheers
Jon