Sibkis Posted August 9, 2011 Share Posted August 9, 2011 HiHow can I use use the h1 tags as the title of the page.What do I need to do.Cheers Link to comment Share on other sites More sharing options...
JamesB Posted August 9, 2011 Share Posted August 9, 2011 when you say title, do you mean the title displayed in the browser's tab bar?as that is set in the <title> tag.you could use javascript to move it from a h1 tag to the title tag, but it would be normal and much better to just echo it in the title tag. Link to comment Share on other sites More sharing options...
Sibkis Posted August 9, 2011 Author Share Posted August 9, 2011 Gidday Jamesyes i am looking to have <h1> abc are great</h1>used as the title or vice versa.I will try the echo. Link to comment Share on other sites More sharing options...
thescientist Posted August 9, 2011 Share Posted August 9, 2011 if you are already generating that content from PHP, then echo would work. if the content is static, then you would need to use javascript. Link to comment Share on other sites More sharing options...
Sibkis Posted August 9, 2011 Author Share Posted August 9, 2011 neither the h1 or the titles are generated by php. but the main content is dynamic using php.I will have a look at javascript. <?php $content_dir = 'content'; if (!empty($_GET['p'])){ $content = scandir($content_dir,0); unset($content[0],$content[1]); $p = $_GET['p']; if (in_array($p.'.inc.php',$content)){ include($content_dir.'/'.$p.'.inc.php'); }else{ echo 'Sorry , Page Not Found.'; } }else{ include($content_dir.'/home.inc.php'); } ?> thats what I am using for the content Link to comment Share on other sites More sharing options...
thescientist Posted August 9, 2011 Share Posted August 9, 2011 then you'll need to use Javascript. Link to comment Share on other sites More sharing options...
Sibkis Posted August 9, 2011 Author Share Posted August 9, 2011 clucking bell. ok cheers for pointing me in the right direction Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.