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
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() {
>
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
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,
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
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
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
7 matches
Mail list logo