homepage Welcome to WebmasterWorld Guest from 54.205.105.23
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
variable used before it's assigned
busystock



 
Msg#: 4085573 posted 2:27 pm on Feb 23, 2010 (gmt 0)

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.

 

Matthew1980

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4085573 posted 3:02 pm on Feb 23, 2010 (gmt 0)

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

jatar_k

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



 
Msg#: 4085573 posted 3:05 pm on Feb 23, 2010 (gmt 0)

assign it at the top of the page

a little more specific information about the scenario would probably help give a more useful answer

liam_85

5+ Year Member



 
Msg#: 4085573 posted 11:35 am on Feb 25, 2010 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved