dynamic html <head> info
| From: | MVCS | Date: | Sun, 18 May 2003 11:31:10 +0000 |
| Subject: | dynamic html <head> info | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148076@lists.php.net to get a copy of this message | ||
Somewhat general variable usage question I guess. Thanks to anyone that has
a few minutes to enlighten me.
Say 'head.php' contains the html <head>title, meta, etc...</head> block of
text, and 'content.php' has html content, and your index page looks like:
<html>
<head>
<? require ("/usr/local/www/dubya.org/htdocs/common/head.php"); ?>
</head>
<body>
<? require ("/usr/local/www/dubya.org/htdocs/common/content.php"); ?>
</body>
</html>
Can you populate variables in 'head.php' from vars in 'content.php,' even
though the head was included first? (and thus already processed?)
eg. having <title><?php print $pagetitle; ?></title> in the head.php, and <?
$pagetitle = "my page title"; ?> at the top of the 'content.php' file.