Include title in header

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jlarry
    New Member
    • Oct 2006
    • 1

    Include title in header

    I have seperated header.php footer.php etc and now want to dynamically change the page title.
    I attempted several options.

    Putting this code in the Home.php:
    <?php include "http://www.jehangirlar ry.com/includes/header.php";
    $title = "Jehangir Larry";
    ?>
    And this in the header.php:
    <title><? echo $title; ?></title>

    ...produced no results. What should I do to get a unique title on each page?
    Thanks in advance.
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You assign the text to the $title variable AFTER you did the echo in the header.php.
    Put the $title variable assignment BEFORE the header.php include.

    Ronald :cool:

    Comment

    Working...