wastedthelight Posted July 25, 2007 Share Posted July 25, 2007 Hi, I was wondering if there's anyone to do the echo before saying what the echo of the value is. <?php echo $header; ?> <?php $header= "test"; ?> Displays nothing, while doing that backward of course does since it reads the page top to bottom. I'm splitting the pages into header and footer and want to header (title of the current page) to be like this so i can just start my pages off saying what the page is with the header= "blah blah blah" Thanks. Quote Link to comment Share on other sites More sharing options...
trq Posted July 25, 2007 Share Posted July 25, 2007 You simply can't echo a variable before it is defined. It is ilogical on so many levels. Quote Link to comment Share on other sites More sharing options...
wastedthelight Posted July 25, 2007 Author Share Posted July 25, 2007 You simply can't echo a variable before it is defined. It is ilogical on so many levels. How would i go about doing this then? Anything that would be like if index.php then display "home" if contact.php display "contact" Something like that you could link me to? Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.