I have a database of text to output to a webpage.
The text could contain characters such as ® and ™ as it is copied straight from brochures.
When I output the text to a browser it appears as a square: �
obviously its because the characters are not in HTML format, therefore i added a function to sort this out.
This works fine on my localhost but when i try it on my remote server it outputs the HTML as ® and ™PHP Code:
$description = "output from database";
$replace = array("®", "™", "°");
$with = array("®","™", "°");
print str_replace($replace, $with, $description);
obviously i don't want the "Â" as again it shows up as a square!
Any idea why its doing this?
Bookmarks