← All built-ins / html_entity_decode()

html_entity_decode()

html_entity_decode(string $s): string

Parameters

NameTypeDescription
$sstringentity-encoded text

Return value

The decoded text ("&" becomes "&").

Example

echo html_entity_decode("Tom & Jerry <3");
Tom & Jerry <3

See also

htmlentities()htmlspecialchars()