Re: [PHP] Variables not set

2002-04-26 Thread Erik Price
On Friday, April 26, 2002, at 04:12 PM, Miguel Cruz wrote: > There is something called "global scope" which refers to all variables > created outside of any function or object. Variables with global scope > are > then available anywhere outside of a function or object. Is there a difference b

Re: [PHP] Variables not set

2002-04-26 Thread Miguel Cruz
On Fri, 26 Apr 2002, Liam Gibbs wrote: > I have a problem with my variables not being set. I have a file I use > for constants and functions, structured like so: > > $this = "this"; > $that = "that"; > . > . > . > function this() { > $h = $this; > $i = $that; > } > > function that() { >

RE: [PHP] Variables not set

2002-04-26 Thread Steve Bradwell
Ha, Sorry wrong instance here, ya global or pass the vars to the function. -Original Message- From: Steve Bradwell [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 3:13 PM To: 'Liam Gibbs'; [EMAIL PROTECTED] Subject: RE: [PHP] Variables not set I'm pretty new to

RE: [PHP] Variables not set

2002-04-26 Thread Steve Bradwell
PROTECTED] Subject: [PHP] Variables not set I have a problem with my variables not being set. I have a file I use for constants and functions, structured like so: $this = "this"; $that = "that"; . . . function this() { $h = $this; $i = $that; } function that() { } Now,

Re: [PHP] Variables not set

2002-04-26 Thread Rasmus Lerdorf
Please read http://www.php.net/manual/en/language.variables.scope.php On Fri, 26 Apr 2002, Liam Gibbs wrote: > I have a problem with my variables not being set. I > have a file I use for constants and functions, > structured like so: > > $this = "this"; > $that = "that"; > . > . > . > function t

Re: [PHP] Variables not set

2002-04-26 Thread Pushkar Pradhan
On Fri, 26 Apr 2002, Liam Gibbs wrote: Shouldn't you be using GLOBAL to access $this, $that inside functions? > I have a problem with my variables not being set. I > have a file I use for constants and functions, > structured like so: > > $this = "this"; > $that = "that"; > . > . > . > function th

[PHP] Variables not set

2002-04-26 Thread Liam Gibbs
I have a problem with my variables not being set. I have a file I use for constants and functions, structured like so: $this = "this"; $that = "that"; . . . function this() { $h = $this; $i = $that; } function that() { } Now, when I run this(), $this isn't set (even though it's above it