note 18748 added to language.variables.scope

From: Date: Sun, 03 Feb 2002 23:30:13 +0000
Subject: note 18748 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-26183@lists.php.net to get a copy of this message
Quick tip for beginners just to speed things up:<P> If you have a bunch of global variables to import into a function, it's best to put them into a named array like $variables[stuff]. <P> When it's time to import them you just so the following; <P> <PRE> function here() { $vars = $GLOBALS['variables']; print $vars[stuff]; } </pre> <BR> This really helps with big ugly form submissions. -- http://www.php.net/manual/en/language.variables.scope.php http://master.php.net/manage/user-notes.php?action=edit+18748 http://master.php.net/manage/user-notes.php?action=delete+18748 http://master.php.net/manage/user-notes.php?action=reject+18748

« previous php.notes (#26183) next »