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. Link to comment https://forums.phpfreaks.com/topic/61654-echo-before-value/ 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. Link to comment https://forums.phpfreaks.com/topic/61654-echo-before-value/#findComment-306892 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. Link to comment https://forums.phpfreaks.com/topic/61654-echo-before-value/#findComment-306910 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.