I’m trying to use this php to replace characters in a text string I’ve taken from a mysql database:
str_replace(array('“', '”', '’', '®', '—'), array('"', '"', "'", '®', '-'), $row{'description'});
Instead of seeing the characters I’m trying to use as replacements, I’m just seeing missing character symbols when the page renders in browser.
If I run that same str_replace code on a string not taken from mysql, it works as expected.
The “description” field in mysql is set to use character set: utf8
what am I missing?