Issues with dynamic <title> in PHP

Posted by dotman14 on Stack Overflow See other posts from Stack Overflow or by dotman14
Published on 2012-03-27T17:21:24Z Indexed on 2012/03/27 17:30 UTC
Read the original article Hit count: 385

Filed under:
|

I have the code below:

   <?php
   $title = "Result Computation" ;
   ?>

     <title>
     <?php echo $title ; ?>
     </title>

I'm using includes to call the header on all the pages, but what i want to do is that on every page i want to make it generate a specific title. On each page i've added

 $title = "Page Title" ;

So that when the page loads it gets the title from the $title i've set on that page, but it the pages keep getting the default Title. Please how do i solve this? Thanks for your time.

© Stack Overflow or respective owner

Related posts about php

Related posts about html