Jump to content


Photo

quotes and meta tags


  • Please log in to reply
2 replies to this topic

#1 minuteman

minuteman
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationFlorida

Posted 06 October 2006 - 12:55 AM

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.



C\'est la vie!

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 06 October 2006 - 01:02 AM

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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 minuteman

minuteman
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationFlorida

Posted 06 October 2006 - 01:46 AM

ok thanks
C\'est la vie!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users