I have two characters that I need to do a search and replace on in a php-string.
’
“
Somehow these are differ
Why not just use str_replace ?
$new_str = str_replace(array('’', '“'), '', $str);
Of course, this requires your PHP scripts to be saved as UTF-8.
And if this doesn't work because those characters cannot be properly written using UTF-8, you'll have to fallback to using their hexadecimal representations.
For example :
$new_str = str_replace(array('\xC2\x91', '\xC2\x93'), '', $str);
(Not sure the hexadecimal values I used are really those of your two special quotes, though)