I need to convert a string like this:
A 'quote' is bold
into:
A \'quote\' is
Make sure you use the right quote_style:
html_entity_decode('A 'quote' is bold', ENT_QUOTES);
ENT_QUOTES Will convert both double and single quotes. (PHP Manual: html_entity_decode)