global variables inside of a function
| From: | Mark McCulligh | Date: | Fri, 21 Jun 2002 13:23:17 +0000 |
| Subject: | global variables inside of a function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103268@lists.php.net to get a copy of this message | ||
Is there a way to access a session variables or server variables from inside
a function?
I have a function and was trying to use $PHP_SELF inside of it.
I get a variable undefined error.
Out side of the function it works fine.
I don't want to parameter pass the global variables to the function, I know
this would work, but I would have to many variables to pass.
Example:
function functionname() {
echo $PHP_SELF;
}
Thanks, Mark.
_________________________________________
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
mmcculli@SykesCanada.com