note 18748 modified in language.variables.scope by irc-html
| From: | irc-html@php.net | Date: | Wed, 24 Apr 2002 19:34:35 +0000 |
| Subject: | note 18748 modified in language.variables.scope by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29792@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>
function here() {
$vars = $GLOBALS['variables'];
print $vars[stuff];
}
This really helps with big ugly form submissions.
--was--
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