RE: [PHP] $GLOBAL question

From: Date: Tue, 19 Aug 2003 11:45:48 +0000
Subject: RE: [PHP] $GLOBAL question
Groups: php.general 
Request: Send a blank email to php-general+get-160003@lists.php.net to get a copy of this message
On 18 August 2003 18:49, Jonathan Pitcher wrote: > Robin, > > There are 2 problems with the example you provided. > > One, $GLOBAL should be $GLOBALS. > > Second you can't print a value that has not been set. See updated code > for an example. > > <?PHP > $aTest = "This is a test"; > $GLOBALS['aTest'] = $aTest; Nope -- that's just setting the same value twice -- $GLOBALS['aTest'] is the same as $aTest when in the global scope. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#160003) next »