I have a weird dash in my text, which isn\'t being detected in a str_replace
.
Here is an example:
Sun: 10:00 – 3:00pm
I don
For an alternative, if other answers don't work for you, like in my case, this works for me.
$title = "Hunting, Tactical & Outdoor Optics eCommerce Store ΓÇô $595,000 ΓÇö SOLD";
$title = str_replace(html_entity_decode('–', ENT_COMPAT, 'UTF-8'), '-', $title);
$title = str_replace(html_entity_decode('—', ENT_COMPAT, 'UTF-8'), '-', $title);