Hi guys, having a little trouble replacing keywords and descriptions... Layout.php echo "<meta name='keywords' content='".$keywords."' />"; echo "<meta name='description' content='".$description."' />"; PHP: Replace page <? $title = 'My title tag for this page'; $keywords = 'my keywords'; $description = 'my description'; ?> PHP: When I view the source code I get <meta name='keywords' content='' /><meta name='description' content='' /> PHP: I really can't work out why it doesn't work so if someone could help I will be really grateful. I didn't notice until the site got indexed in Google, disaster! Lol well at least I spotted it relatively soon!
Thanks tihan but I'm including a layout file, and I need to have different titles and keywords for each page. I'll try using an if statement instead maybe something like: function ShowHeader($Title,$MetaDesc){$DefTitle = "Show me when title is blank";$DefMetaDesc = "Show me when Meta Desc is blank";if($Title=="")$Title=$DefTitle;if($MetaDesc=="")$MetaDesc=$DefMetaDesc;//header stuff goes here} PHP: