Travist6983 Posted October 22, 2010 Share Posted October 22, 2010 I am posting this into the Newbie forum cause this seems nebieish to me... Ok i have a few files that make up a set of pages Topbar.php index.php info_birmingham.php ( i want the title to match the info page i have a few cities ) footer.php OK so obviously the <title> is in top bar and i am trying to display the city name in the title which would be gotten from the info_city page so in topbar i have... <title><?php echo ("$city"); ?> - <?php echo COMPANY; ?></title> and then in the info_city page i have at the top of the page <?php $city = "Birmingham"; ?> So i guess my question is why does the title not display the city name? SOMEONE please help i have been pulling my hair out on this you can see form the URL string that index.php controls all of the pages and the info page has the data for each city http://www.skbk.com/OaklandCounty/index.php?section=Birmingham Thanks to anyone that might be able to shed some insight on this for me T Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted October 22, 2010 Share Posted October 22, 2010 Most likely because you try and echo $city before it has been defined. Look at the order of your includes. I think it would be easier in your setup and less to keep track of if you do this: <title><?php echo ucfirst($_GET['section']); ?> - <?php echo COMPANY; ?></title> 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.