Re: [PHP] Re: globals in functions

2002-04-14 Thread Philip Olson


> Is there an easier way than having to manually place "global" 
> in each function...??

It's not that hard :)

> Other than passing by parameter?
> 
> Like is it possible to actually declare var's in PHP 
> as global?

No.  Consider arrays, constants, extract(), etc.


Regards,
Philip


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: globals in functions

2002-04-13 Thread The_RadiX

Just one thing...


Is there an easier way than having to manually place "global" in each
function...??


Other than passing by parameter?


Like is it possible to actually declare var's in PHP as global?




thx..





:::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: globals in functions

2002-04-13 Thread phplists

function someCommand()
{
global $var1, $var2, $var3;

stuff();
}

I think you could also use define(); maybe..

Later,

Bob Weaver

"Paul Roberts" <[EMAIL PROTECTED]> wrote in message
00f301c1e311$fa421af0$dde5883e@laptop1">news:00f301c1e311$fa421af0$dde5883e@laptop1...
Is there a quick way to set all variables as global so that they are
avalible to a function, i'm doing an eval inside, so i need all the
submitted variables to be avalible, or do i have to decalre them
individualy.

Paul Roberts
[EMAIL PROTECTED]







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php