I've been using headers to create templates for websites. It's easy, and very convenient for debugging.
I now face the problem of using head BUT with custom page titles. If this is my header.php >
<html>
<head>
<title> My Site : ??? </html>
</head>
<body>
</body>
</html>
I need ??? to be replaced for every page.
Is this possible? If so, how? Thank you. : )
Not knowing more about your file inclusion scheme, the simplest way would be:
page2.php
<?php
$pageTitle = 'Page 2';
include 'header.php';
?>
<div>My content</div>
<?php include 'footer.php'; ?>
header.php
<html>
<head>
<title> My Site : <?php echo $pageTitle ?> </title>
</head>
<body>
footer.php
</body>
</html>