Managing Title Tag with PHP - PHP Views : 342
Tagged in : PHP
0 0
Send mail
You can use php define function to define a title tag and defined() is used to check whether a given named constant exists.

//require the header file
require('require/header.php');
//rest of code here

//require the footer
require('require/footer.php'); ?>


then you replace the title tags in require/header.php with:

<title><?php if (defined ('TITLE')) {
print TITLE;
} else {
print 'Site Title Not Set.';
}
?></title>

By Rekha, On - 2009-11-20



    Login to add Comments .