FederalProgrammer
Programmer
I am grabbing a huge html text from a database and I have to strip off the unwanted junk before I can use the text:
I print off the $newsText into a predefined area of my website; The only problem is I get a lot of "?" all over the place. Single quotes for example get replaced by "?". Also, double spaces get replaced by "?".
What am I doing wrong?
---------------
Code:
$newsText = $row->news_text;
$newsText = str_replace("\'", "'", $newsText);
$newsText = str_replace("\"", '"', $newsText);
$newsText = str_replace(" ", " ", $newsText);
I print off the $newsText into a predefined area of my website; The only problem is I get a lot of "?" all over the place. Single quotes for example get replaced by "?". Also, double spaces get replaced by "?".
What am I doing wrong?
---------------