I have a HTML string containing £ signs, for some reason i'm not able to replace them. I'm assuming this is an encoding issue although i can't work out how. The site is using ISO-8859-1 for its encoding
$str = '<span class="price">£89.99</span>';
var_dump(mb_detect_encoding($str, 'ISO-8859-1', true)); // outputs ISO-8859-1
echo str_replace(array("£","£"),"",$str); // nothing is removed
echo htmlentities($str); // the entire string is converted, including £ to £
Any ideas?
EDIT
should have pointed out i want to replace the £ with £
; - i had temporarily added £
to the array of items to replace in case it had already been converted