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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
tarun Posted February 3, 2007 Author Share Posted February 3, 2007 Thnx Thats Great Tarun Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.