Jump to content

Different Title Depending On URL


tarun

Recommended Posts

I Need Some Help

I Want To Have A Different Page Title (<title>) Depending On The URL

Ive Got This But I Know That Its Wrong

<?PHP
if $_SERVER['PHP_SELF'] == "index.php"{
echo "<title>HomePage</title>";
}
if $_SERVER['PHP_SELF'] == "chat.php"{
echo "<title>ChatRoom</title>";
}
else{
echo "<title>PageNotFound</title>"
}
?>

 

Thnx

 

Tarun

Link to comment
https://forums.phpfreaks.com/topic/37037-different-title-depending-on-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.