note 23925 added to language.variables.predefined

From: Date: Thu, 01 Aug 2002 15:38:41 +0000
Subject: note 23925 added to language.variables.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-34091@lists.php.net to get a copy of this message
If you set a variable with $GLOBALS, you can still refer to it as just $variablename. That is, if in your script you put the following code: -- <?PHP $GLOBALS['variable_name'] = 'variable_value'; echo $variable_name; // echoes 'variable_value' ?> -- This isn't too unexpected, but the documentation didn't clearly state this either. However if your variable_name includes a space or starts with a number, you cannot access it (as far as I know), except with using the $GLOBALS array. -- http://www.php.net/manual/en/language.variables.predefined.php http://master.php.net/manage/user-notes.php?action=edit+23925 http://master.php.net/manage/user-notes.php?action=delete+23925 http://master.php.net/manage/user-notes.php?action=reject+23925

« previous php.notes (#34091) next »