109 of 410 menu

The htmlspecialchars_decode Function

The htmlspecialchars_decode function performs the reverse operation of the htmlspecialchars function.

Syntax

htmlspecialchars_decode(string $string, int $flags = ENT_COMPAT): string

Example

Let's convert a string with tags:

<?php $str = '<b>text</b>'; $res = htmlspecialchars_decode($str); echo $res; ?>

Code execution result:

'<b>text</b>'

See Also

byenru