i have a news section that takes data from a xml feed. i am using feed parser called FeedForAll (code can be found here: http://www.feedforall.com/download.htm). i've been having some probs with the em dash, heres an example: SAN FRANCISCOâ€"The presidential candidates...
i've tried using code like this to fix the prob:
but this doesn't seem to fix the prob
any help on this one would be great
i've tried using code like this to fix the prob:
| Code: |
| 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); } $XML = str_replace("—", "—#;", $XML); //added extra # so it doesn't get converted $XML = str_replace("—", "—#;", $XML); //added extra # so it doesn't get converted $XML = convert_smart_quotes($XML); |
but this doesn't seem to fix the prob
any help on this one would be great
