Hi I have a single page ajax website the single page is basically loading all the pages I would like to set the page title depending on the current view.
I have tried using this
<title><!--TITLE--></title>
<?
$pageContents = ob_get_contents (); // Get all the page's HTML into a string
ob_end_clean (); // Wipe the buffer
// Replace <!--TITLE--> with $pageTitle variable contents, and print the HTML
echo str_replace ('<!--TITLE-->', $pageTitle, $pageContents);
?>
I have then added the titles to the page links like this
<li class="menu-link">
<a href="index.php?page=home"><img src="images/menu/home.png" width="72" height="72" alt="Home" />Home</a>
<?php $pageTitle = 'Saunders-Solutions Freelance Design and Development'; ?>
</li>
<li class="menu-link">
<a href="index.php?page=about"><img src="images/menu/about.png" width="72" height="72" alt="About" />About</a>
<?php $pageTitle = 'About Saunders-Solutions Freelance Design and Development'; ?>
</li>
however it always shows the same title for all pages any help appreciated