Html_entity_decode () turn HTML entities into character prototypes _php tutorial

Source: Internet
Author: User
PHP Html_entity_decode () applies to PHP 4.3.0+ and converts HTML entities into characters.

Html_entity_decode (string containing HTML entities, optional how to decode quotes, optional character encoding set)

If the string contains a character set that cannot be recognized, it is ignored and replaced by Iso-8859-1. You can use PHP htmlentities () to convert HTML tags, quotation marks, and other strings outside the ASCII character set to HTML entities.

How to decode quotes:

Ent_compat-Default. Decodes only double quotes.

Ent_quotes-decodes double and single quotes.

Ent_noquotes-Do not decode any quotation marks.

Character encoding set:

Iso-8859-1-Default. Western europe.

Iso-8859-15-Western Europe (added Euro symbol and French, Finnish alphabet).

UTF-8-ASCII-compatible multi-byte 8-bit Unicode

Cp866-dos dedicated Cyrillic Character Set

Cp1251-windows dedicated Cyrillic Character Set

Cp1252-windows Special Western European character set

Koi8-r-Russian

GB2312-Simplified Chinese, national standard character set

BIG5-Traditional Chinese

Big5-hkscs-big5 Hong Kong expansion

Shift_JIS-Japanese

EUC-JP-Japanese

PHP htmlspecialchars () Convert & ' < and > to HTML entities

PHP Htmlspecialchars_decode () Invert & ' < and > HTML entities into characters

PHP htmlentities () converts HTML tag characters to HTML entities

PHP Html_entity_decode () turns all HTML entities into character prototypes

PHP Html_entity_decode () instance

Although PHP htmlentities () can only be used to instantiate HTML tag strings, you can use PHP Html_entity_decode () to convert all HTML-manifested characters into characters.

 ShowCode (){ (' & ', ' & ',< span="">= '--"e.v-get.com" <--  < span="">   < span=""> '   < span=""> =< span="">(,    showcode (  < span="">  < span=""> < span="">  < span=""> < span=""> < span="">< span=""> = < span="">(< span="">< span="">  < span="">showcode (< span="">"E.< span=""> < span="">  V-get.com "<--"< span="">=< span="">(< span="">  , < span=""> showcode (< span="">"E< span="">  < span=""> < span=""> . V-get.com "<--"?>

Original: http://e.v-get.com/w3c/PHP_html_entity_decode.html

http://www.bkjia.com/PHPjc/729852.html www.bkjia.com true http://www.bkjia.com/PHPjc/729852.html techarticle PHP Html_entity_decode () applies to PHP 4.3.0+ and converts HTML entities into characters. Html_entity_decode (string containing HTML entities, optional how to decode quotes, optional character encoding set) if ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.