O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

get_html_translation_table

Synopsis

array get_html_translation_table([int which[, int style[, string encoding]]])

Returns the translation table used by either htmlspecialchars() or htmlentities(). If which is HTML_ENTITIES, the table used by htmlentities() is returned; if which is HTML_SPECIALCHARS, the table used by htmlspecialchars() is returned. Optionally, you can specify which quotes style you want returned; the possible values are the same as those in the translation functions:

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

ENT_HTML401

Table for HTML 4.01 entities

ENT_XML1

Table for XML 1 entities

ENT_XHTML

Table for XHTML entities

ENT_HTML5

Table for HTML 5 entities

The encoding optional parameter has the following possible selections:

ISO-8859-1

Western European, Latin-1.

ISO-8859-5

Cyrillic charset (Latin/Cyrillic), rarely used.

ISO-8859-15

Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1.

UTF-8

ASCII compatible multibyte 8-bit Unicode.

cp866

DOS-specific Cyrillic charset.

cp1251

Windows-specific Cyrillic charset.

cp1252

Windows-specific charset for Western European.

KOI8-R

Russian.

BIG5

Traditional Chinese, mainly used in Taiwan.

GB2312

Simplified Chinese, national standard character set.

BIG5-HKSCS

Big5 with Hong Kong extensions, Traditional Chinese.

Shift_JIS

Japanese.

EUC-JP

Japanese.

MacRoman

Charset that was used by Mac OS.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required