I’m trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have tried:
html2textcommand linehtml_entity_decode+ENT_QUOTES|ENT_HTML401UTF-8html_entity_decode(htmlentities($str))strip_tagstrim
It did help a lot for cleaning up other things, but those &\#8217; “ don’t get fixed. How can I convert them correctly?
Did you tried “htmlspecialchars_decode”
The above example will output: