"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > --- Five <[EMAIL PROTECTED]> wrote: > > That did it! I wonder if there is a way, then, to have it work even if > > the variable is initialized after it is echoed. > > You see, that makes no sense, and that's why no one else was able to > answer your question. Code is executed in order. Consider this: > > <?php > $foo = 'one'; > echo $foo; > $foo = 'two'; > ?> > > This script will output "one", and it should. :-) >
My problem isn't the logic of when and where to output variable values. It's figuring out when a session variable will accept initialization and what enables and/or prevents it from doing so. I would like to be able to initialize a session variable on one page, call a second page, have the code on the second page process some information and reinitialize the session variable to another value so that new value could be available to be used on the first page. A lot like having a function return a value. The problem is that the session variable won't accept a new value just any old where in the code on the second page (apparently.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php