Hello everyone, I have created a dynamic title script for those that want to use PHP and comapre certain variables to a title name to get a page title
In this example, you are comparing the title from a list of arrays from the PHP_SELF command.
Code:
<?
/*
PHP Dynamic Title
Author: rm249
Site: http://www.rm249.com/
*/
// Setting the variable $x to $PHP_SELF
$x="$_SERVER[PHP_SELF]";
// Site absolute path (if root, leave blank)
$abs_path = "";
// Title variable list (copy and modify for each title
$title_var["$abs_path"."/index.php"]="Home";
// Setting the title to whatever the variable is for $PHP_SELF
$var_1=$title_var[$x];
if ($var_1 == ""){
$title="(!PAGE_TITLE_NOT_AVAILABLE!)";
} else {
$title=$title_var[$x];
}
?>
I use this on rm249.com, rm249.net, and have modified it for Hubi to use on hlgamer.com as well. I know there CAN be imporvements on it, but.... maybe I will get to it later
RM249