Jump to content

Outputing speech marks, also dynamic meta tags using php


wright67uk

Recommended Posts

 

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?

<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???

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.