Something most have just been wigging out or something because I can't get
it to do it again. Maybe I just did something wrong, but it seems to be
working now. Thanks for the help though,

"Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message
> On Tue, 2002-03-12 at 14:38, David Johansen wrote:
> > I have a little chunk of code that checks to see if a variable exists
and if
> > not then it sets it. It goes like this:
> >
> > if (empty($page))
> > {
> >    $page = "login";
> > }
> >
> > I then end that part of the php script after doing what I need to. Then
> > start up again on the same html page and I assumed that $page had a
> > assigned to it because of the above code, but it appears that it
doesn't. Is
> > this supposed to happen or is something weird happening. I added that
> > bit of code to the second chunk of code and it fixed the problem. Is
> > the "right" way to do it? Is that variable only available in the <?php
> > that it's declared in? Thanks,
> > Dave
> Shouldn't be. A variable is valid from the point it's declared until
> it's unset(), or goes out of scope (the function within which it was
> declared ends), or the script ends.
> Can you provide a short script which exhibits this behaviour?
> --
>  Torben Wilson <[EMAIL PROTECTED]>
>  +1.604.709.0506

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to