[Wylug-help] PHP equiv of my or local variable

James Holden james at jamesholden.co.uk
Wed, 22 Jan 2003 16:06:56 -0000 (GMT)


> Hi folks,
>
> is it possible to have local variables within blocks in php, as you can
> with perl?

[snip code]

Gary,

IIRC yes that's possible, provided you have register_globals = off in your
php.ini file.

Should you wish to use a global variable in your code, simply declare it
as such (global $foo;).

Maybe some of the PHP gurus could confirm this, cos I'm a bit rusty.

James