PHP Webmaster <mailto:[EMAIL PROTECTED]>
on Monday, October 20, 2003 4:36 PM said:
> As you can see, the above code will not work as the $title variable
> has not been set yet. So, I need a way of opening up the home.php
> file, extracting the line containing the $title variable and putting
> that information inbetween the <title></title> tags.
In that case do it backwards:
index.php:
<?php
$title = "page title";
include "header.php";
echo "<p>Welcome to the home page of our website.</p>\n"
."<p>Blah, blah and more blah!</p>\n";
include "footer.php";
?>
header.php:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
footer.php:
</body>
</html>
Hope this helps!!
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php