tarun Posted February 3, 2007 Share Posted February 3, 2007 I Want Some Thing Like Say If The Is index.php To Echo <TITLE>Tarun-Home</TITLE> And If It Is chat.php To Echo <TITLE>Tarun-Chat</TITLE> Im Not Sure How To Do It - Any Ideas? Thnx Tarun Link to comment https://forums.phpfreaks.com/topic/36904-title/ Share on other sites More sharing options...
Orio Posted February 3, 2007 Share Posted February 3, 2007 Something like this? echo "<title>Turan-".basename($_SERVER['PHP_SELF'],".php")."</title>"; Orio. Link to comment https://forums.phpfreaks.com/topic/36904-title/#findComment-176046 Share on other sites More sharing options...
tarun Posted February 3, 2007 Author Share Posted February 3, 2007 Thnx Thats Great Tarun Link to comment https://forums.phpfreaks.com/topic/36904-title/#findComment-176048 Share on other sites More sharing options...
Orio Posted February 3, 2007 Share Posted February 3, 2007 Btw, you might want to use ucfirst() also. echo "<title>Turan- ".ucfirst(basename($_SERVER['PHP_SELF'],".php"))."</title>"; Orio. Link to comment https://forums.phpfreaks.com/topic/36904-title/#findComment-176049 Share on other sites More sharing options...
tarun Posted February 3, 2007 Author Share Posted February 3, 2007 Ok Thnx But Could This Work if $_SERVER['PHP_SELF'] == "index.php"{ echo "<title>HomePage</title>"; } else{ echo "<title>PageNotFound</title>" } Just Remember Im A Bit Of A Newbie When It Comes To If and ElseIf Tarun Link to comment https://forums.phpfreaks.com/topic/36904-title/#findComment-176050 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.