Name

htmlentities

Synopsis

string htmlentities(string string[, int style)

Converts all characters in string that have special meaning in HTML and returns the resulting string. All entities defined in the HTML standard are converted. If supplied, style determines the manner in which quotes are translated. The possible values for style are:

ENT_COMPAT (default)

Converts double quotes, but not single quotes

ENT_NOQUOTES

Does not convert either double quotes or single quotes

ENT_QUOTES

Converts both single and double quotes

Get Programming PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.