Welcome to WebmasterWorld Guest from 54.145.173.36

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

variable used before it's assigned

   
2:27 pm on Feb 23, 2010 (gmt 0)

5+ Year Member



i have to display a variable at the top of the page, and the variable is assigned in the middle of the page...

how can i do that? thank you.
3:02 pm on Feb 23, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi there busystock,

Just quickly thinking, couldn't you assign the var to a session and then refresh the page then:-

echo (isset($_SESSION['some_session']) ? $_SESSION['some_session'] : '');


Again just a thought, but you can see the process there hopefully...

Cheers,

MRb
3:05 pm on Feb 23, 2010 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



assign it at the top of the page

a little more specific information about the scenario would probably help give a more useful answer
11:35 am on Feb 25, 2010 (gmt 0)

5+ Year Member



Hello,

Why dont you assign the variable at the top of the page and assign the other data (what you are using in the middle of the page) in variables at the same point, then call on them in the middle of the page.