I am taking posts from a WordPress blog, and displaying the latest ones on a client’s home page. However, this client has a tendency to type double spaces between sentences instead of single spaces.
On those with double spaces, IE8 shows a box and google Chrome a question mark between the sentences. I am looking for php code where there are double spaces, I want to replace it with a single space.
I have tried the regular string replace function, but this didn’t work. I still get the boxes and question marks.
$content // this is the content string
$content = str_replace(". ", ". ", “$content”);
Print $content;