wright67uk Posted June 29, 2011 Share Posted June 29, 2011 in my <head> I have the following code; <meta name="description" content=<?php $subtype = $_GET['subtype']; $subtype = ucwords (strtolower($subtype)); echo "\"$subtype\" "?> /> Im trying to output <meta name="description" content= "Subtype"/> But im actually outputing <meta name="description" content="Subtype" /> What is the best way of doing this? Also Is this the correct use of dynamic keywords for search engines to pick up on? Quote Link to comment https://forums.phpfreaks.com/topic/240745-outputing-speech-marks-also-dynamic-meta-tags-using-php/ Share on other sites More sharing options...
Andy-H Posted June 29, 2011 Share Posted June 29, 2011 <meta name="description" content="<?php echo isset($_GET['subtype']) ? strtolower($_GET['subtype']) : ''; ?>" /> Why not just wrap the php tags in quotes, and why use ucwords then strtolower??? Quote Link to comment https://forums.phpfreaks.com/topic/240745-outputing-speech-marks-also-dynamic-meta-tags-using-php/#findComment-1236569 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.