note 30271 added to functions
| From: | nutbar at innocent dot com | Date: | Wed, 12 Mar 2003 18:06:16 +0000 |
| Subject: | note 30271 added to functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45163@lists.php.net to get a copy of this message | ||
Regarding the comments about having to declare global variables inside of functions before you can
use them...
Lots of you seem to complain about having to declare lots of variables, when really there's one
simple solution to this:
global $GLOBALS;
This will define the $GLOBALS variable inside your code, and since that variable is basically like
the mother of all variables - *presto*, you now have access to any variable in PHP.
--
http://www.php.net/manual/en/functions.php
http://master.php.net/manage/user-notes.php?action=edit+30271
http://master.php.net/manage/user-notes.php?action=delete+30271
http://master.php.net/manage/user-notes.php?action=reject+30271