Hi, I have a bit code I use to replace certain characters such as speech marks and apostrophes. It usually works very well. But for some reason it doesn’t seem to be working on one of my pages.
Basically on the page in question it opens up an XML file and you are able to edit it and the code for it looks like this:
function convert_smart_quotes($string)
{
$search = array(chr(145),
chr(146),
chr(147),
chr(148),
chr(151));
$replace = array("'",
"'",
'"',
'"',
'-');
return str_replace($search, $replace, $string);
}
in use:
.convert_smart_quotes($description).
Could be it’s being read from an xml file or something? It seems to work fine on one of my other pages that generates an RSS Feed.
Any info or advice would be great.
Cheers.