global scope issue

From: Date: Wed, 13 Aug 2003 14:26:59 +0000
Subject: global scope issue
Groups: php.general 
Request: Send a blank email to php-general+get-159432@lists.php.net to get a copy of this message
I'm having problems using global vars. I have read the docs and all of the notes but it's not helping. Simplified example: /dir1/script2.php <?php $test = array ( 'a' => '1', 'b' => '2'); ?> /dir1/script1.php <?php include("/dir1/script2.php"); print_r($test); //works great print_r($GLOBALS['test']); //does not work ?> This is a local include so the vars should be in the global scope right? Any help please? TIA -Shawn

« previous php.general (#159432) next »