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? 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??? 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
Archived
This topic is now archived and is closed to further replies.