I have a very trivial problem with str_replace.
I have a string with the En Dash character ( - ) like this:
I want to remove - the dash
Try this:
$new_string = str_replace('–','',$string);
Or:
$new_string = str_replace(html_entity_decode('–'),'',$string);
It is basically same as:
$new_string = str_replace ('-','',$string);