Skip to content
Advertisement

What is the correct way to decode “&Lowbar;” into “_”?

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 :

JavaScript

Which print:

JavaScript

See PHP Manual:https://www.php.net/manual/en/function.html-entity-decode.php

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement