I would like to decode htmlspecial charater for example '
to be transfomed as '
I would like to avoid making regexp.
I tried htmlspecialchars_decode($mystring);
It works for charater such as à
but not for one with character code.
I would like to decode htmlspecial charater for example '
to be transfomed as '
I would like to avoid making regexp.
I tried htmlspecialchars_decode($mystring);
It works for charater such as à
but not for one with character code.
Use html_entity_decode()
https://www.php.net/manual/en/function.html-entity-decode
<?php
echo html_entity_decode(''');
// outputs '
Try it here https://3v4l.org/IcDlB