Hi, I have just about completed my first php website and am not sure how to add a title tag for each of the pages? I have used <title> Title </title> tag but the title is not coming up at the top of any of my pages. Is there another way title tags should be written when developing a site in php as to opposed from the traditional XHTML sites?
Hy , You can set a variable that store the title of the curwent page. That title can be taken from a database, or an array with titles. Than echo that variable within the HTML <head> area, like this: PHP: <?php $titl = 'Text for title'; echo '<title>'. $titl. '</title>'; ?>
In PHP, title tag can be used at header, <title > <?php print $title; ?> </title> title tag can be used with meta tags at header, <title> <?php print $title; ?> </title> <meta name="keywords" content= " <?php print $meta_keywords; ?>" >