Include Title in < head >
Posted: Sun Feb 13, 2011 7:58 pm
Hello! I am making a site with PHP. I have separated the header into it's own file and used the "include" PHP feature to "fetch" it, sorta like Wordpress. The only problem is I want to change the <title> element for each page. How can I do this?
I was thinking something like this: inside the index.php, contact.php, etc put some PHP code that says "this is the title of the page." Then in the header.php inside the <title> tag have a PHP code that basically looks for the "title of the page" and echos it.
Any help would be appreciated. I will be on the forum and will reply fast. Thanks!
I was thinking something like this: inside the index.php, contact.php, etc put some PHP code that says "this is the title of the page." Then in the header.php inside the <title> tag have a PHP code that basically looks for the "title of the page" and echos it.
Any help would be appreciated. I will be on the forum and will reply fast. Thanks!