|
| |
|
|
Shile
Posts: 5 Joined: 3/23/2004 Status: offline
|
Page title from included php page - 5/9/2009 16:53:47
I want that my site has different title on almost every page. How do I get page title from included php file... I have an index.php file that inlcudes header, content and footer page...how do I pull page title from content.php??
|
|
|
|
BobbyDouglas
Posts: 5525 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Page title from included php page - 5/9/2009 21:29:08
For example, you have an index.php page, and you want to include a header and apply a custom page title: <?php
$page_title="my page title is here";
include("/home/user/public_html/header.inc.php");
?>
<body>
<p>hello</p>
</body>
</html> Your header.inc.php page outputs the value of the $page_title attribute: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $page_title; ?></title>
</head>
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|