|
Posted by Dan on 11/10/05 12:51
If I've got one file called header.php that contains the following code ...
<html>
<head>
<title><?php echo "$title_string";?></title>
</head>
and I've got index.php that contains the following code ...
<?php $title_string = "My Title String"; ?>
<?php include "header.php"; ?>
Main body contents<br>
</html>
Why is the $title_string variable empty (or undefined) in header.php? Basically, my actual header.php is a lot bigger, and I want
all my webpages to include this header, but specifying different options - ie. the title string, and a few others.
Cheers for any help,
Dan.
Navigation:
[Reply to this message]
|