개발/PHP
[PHP] get_html_translation_table
지산동고라니
2020. 3. 16. 22:12
(PHP 4 5 7)
htmlspecialchars() 함수와 htmlentities() 함수를 사용하여 변환되는 목록을 반환합니다.
설명
get_html_translation_table ([int $table = HTML_SPECIALCHARS [, int $flags = ENT_COMPAT | ENT_HTML401 [ , String $encoding = "UTF-8" ]]] ) : array
파라미터
table 테이블을 선택할 수 있습니다. HTML_ENTITIES or HTML_SPECIALCHARS
flags
ENT_COMPAT | 큰따옴표에 대한 엔티티는 포함되나 작은 따옴표는 포함되지 않는 표 |
ENT_QUOTES | 작은 따옴표와 큰 따옴표 모두를 포함한 엔티티 |
ENT_NOQUOTES | 작은 따옴표 와 큰따옴표에 대한 엔티티 포함 X |
ENT_HTML401 | HTML 4.01.를 위한 테이블 |
ENT_XML1 | XML 1를 위한 테이블 |
ENT_XHTML | XHTML를 위한 테이블 |
ENT_HTML5 | HTML5를 위한 테이블 |
encoding의 기본값은 UTF-8입니다.
다른 문자셋은 php.net 참고 바랍니다.
https://www.php.net/manual/en/function.get-html-translation-table.php
PHP: get_html_translation_table - Manual
The fact that MS-word and some other sources use CP-1252, and that it is so close to Latin1 ('ISO-8859-1') causes a lot of confusion. What confused me the most was finding that mySQL uses CP-1252 by default. You may run into trouble if you find yourself te
www.php.net