Jump to content

Archived

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

minuteman

quotes and meta tags

Recommended Posts

I built a script for placings variables into the meta tags. It's working but the content doesn't have any quotes around it. Yet if I echo the same value in a browser the quotes are there.

Here is the code

$re_meta_description = str_replace('$continent', $continent, $meta_description);

$re_meta_description = '"'.$re_meta_description
.'"';  (this is putting two quotes around the var by putting the quote within two apostrophes)

echo ' re_meta_description = ' , $re_meta_description;?><BR><?
(this echo in a browser writes the description with quotes at beginning and end)

<META NAME="revisit-after" CONTENT=<?echo $meta_revisit;?>>
<meta name="description" content=<?$re_meta_description;?>>
(these two produce the same results - no quotes)

Something is also taking the quotes in the metatags and showing them as apostrophes in the page source.

I doing all this believing spyders need the quotes to be able to read the tags but they do read the title without quotes. Is there anyway to see the page as a spyder would to see if it even matters? And I guess with most search engines not using metatags maybe I should just settle for the title working.


Share this post


Link to post
Share on other sites
dont do this as all bots will bot the metatag ok.

hard codded metatags are better if you want a good page ranking ok.


so if the metatag needs to be on all pages just make one page with the metatag information and use include("page.php"); to every page that needs the metatags ok.

Share this post


Link to post
Share on other sites

×

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.