This simple PHP function is pretty handy if you want your websites pages in the title without having to name individual ones.
It will look like:
MyWebsite | Index
MyWebsite | Gallery
MyWebsite | Forums
etc..
paste the code into your "functions" file, or any webpage which is included in every page you have
(Reminder: To include a webpage, use 'include("webpage.php");')
You can of course put the function in each page, but that's just annoying .. :P
then, in each webpage you want the title to appear, put
<?php
include("the_function_webpage");
title();
....
?>
I've quoted each line to show the people who don't do PHP, how the function works a little better
Rate it, post comments :P
function title() {
$page = $_SERVER["PHP_SELF"];
// Set variable $page as the current webpage
$page = str_replace(".php","",$page);
// Remove the .php ending from the string: $page
$page = str_replace("/","",$page);
// Remove the / before the website name
$page = ucwords($page);
// Capitalize the first letters
echo '<title>MyWebsite | ' .$page. '</title>';
// Change "MyWebsite" to your website name
}