possable to marque the tittle?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

possable to marque the tittle?

Post by gaogier »

Would it be possable to marque the tittle, mabey, change the title when someone loads a page, but using the include tags, (change the head of the html code)?
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

You can change the html title with php.

Your page needs to be a file with a .php extension or your webserver must be setup to interpret .html page as PHP

Code: Select all

$Title = "My Title";

?>
<html>
<head>
<title><?=$Title?></title>
</head>
Is one way to do it.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

so, if i include the header on each page, i can just use that page, and then when i link it up with, contact us, it will be different to the home page?


my website is php 5 + (the latest version) just updated all, mysql, php, perl, ect
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

viewtopic.php?t=65205 may be of interest
Post Reply