Forum Moderators: coopster

Message Too Old, No Replies

Apostrophe Problem

Google won't index ´

         

internetheaven

4:30 pm on Nov 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One of my "Trading As" names uses an apostrophe:

e.g. Example's Direct

And I've only just noticed that Google doesn't index ´ as being an apostrophe, my entire site's coding uses "Example´s Direct" to avoid problems displaying the name in different browsers. This of course means that if someone searches for "Example's Direct" on Google my company doesn't show up!

As this is site wide and the site is dynamic I can change the name on every page and in every article using str_replace but I can't get the commant to work because it uses apostrophes iteself:

e.g. $example = str_replace("´", ''', $example);

obviously doesn't parse correctly. How do I replace all the ´ in the database with apostrophes?

Birdman

4:44 pm on Nov 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your str_replace should work if you use doubles around the second parameter.

$example = str_replace("´", "'", $example);

or escape the quote:

$example = str_replace('´', '\'', $example);