I assume that this should be quite easy but i just cant figure this out at all... I'm trying to make it so that the title of the page changes depending on the page that is included into my base index.php.
i have things set up within the index.php so that i use this code
Expand|Select|Wrap|Line Numbers
- <?php
- if (!isset($_GET['page'])) {
- $page = "blog";
- } else {
- $page = $_GET['page'];
- }
- include ("pages/".$page.".php");
- ?>
what i want to do is be able to have the viewer be able to browse to, say, the Games page and have that reflect in the title. like: MicroStudios - Games - Best Viewed In Firefox
the problem i keep mindlessly running into is that the include page is of course always rendered AFTER the page title has been set... every site i've browsed through did not have a solution other than javascript and i'd like to avoid that 'cause that causes SEO problems...