note 31255 added to language.variables.scope

From: Date: Tue, 15 Apr 2003 13:53:15 +0000
Subject: note 31255 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-46643@lists.php.net to get a copy of this message
The following function allows you to dynamically create a global variable from within a function: function defineGlobalVariable( $variableName ) { if( !isset( $GLOBALS[$variableName] ) ) $GLOBALS[$variableName] = null; } I know it's not good coding style, but sometimes it can be usefull :-) -- http://www.php.net/manual/en/language.variables.scope.php http://master.php.net/manage/user-notes.php?action=edit+31255 http://master.php.net/manage/user-notes.php?action=delete+31255 http://master.php.net/manage/user-notes.php?action=reject+31255

« previous php.notes (#46643) next »