I have tried using html_entity_decode but it didn’t work.
What is the correct function to use it to decode it?
Advertisement
Answer
You can simply use ENT_HTML5
flag with html_entity_decode :
echo html_entity_decode ('_', ENT_HTML5);
Which print:
_
See PHP Manual:https://www.php.net/manual/en/function.html-entity-decode.php