I know that the question was answered, but setting the meta tag did not help in my case, and the selected answer was not clear enough, so I wanted to give a simpler answer.
So, to make it simple, save the string in a variable and process it like this
$TVrageGiberish = "It’s Getting the Best of Me"; $notGiberish = mb_convert_encoding($TVrageGiberish, "HTML-ENTITIES", 'UTF-8'); echo $notGiberish;
Which should return what you need It's Getting the Best of Me
If you parse something, you can perform the conversion by assigning values to a variable like this, where $TVrage is an array with all the values, the XML in this example is from a feed with a "Title" tag, which can contain special characters, such as ‘ or ’ .
$cleanedTitle = mb_convert_encoding($TVrage->title, "HTML-ENTITIES", 'UTF-8');
Tumharyyaaden Sep 11 '13 at 14:41 2013-09-11 14:41
source share