Name
htmlentities
Synopsis
string htmlentities(stringstring[, intstyle[, stringencoding[, booldouble_encode]]] )
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:
| Converts double quotes, but not single quotes |
| Does not convert either double quotes or single quotes |
| Converts both single and double quotes |
| Replace invalid code unit sequences with a Unicode Replacement Character |
| Replace invalid code points for the given document type with a Unicode Replacement Character |
| Handle code as HTML 4.01 |
| Handle code as XML 1 |
| Handle code as XHTML |
| Handle code as HTML 5 |
If supplied, encoding determines the
final encoding for the characters. The possible values for
encoding are:
| Western European, Latin-1. |
| Cyrillic charset (Latin/Cyrillic), rarely used. |
| Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1. |
| ASCII-compatible multi-byte 8-bit Unicode. |
| DOS-specific Cyrillic charset. |
| Windows-specific Cyrillic charset. |
| Windows-specific charset for Western European. |
| Russian. |
| Traditional Chinese, mainly used in Taiwan. |
| Simplified Chinese, national standard character set. |
| Big5 with Hong Kong ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access