1. The Htmlspecialchars () function converts some predefined characters into an HTML entity function prototype: Htmlspecialchars (String,quotestyle,character-set) predefined characters are: & (And) Becomes & "(double quotation mark) becomes" ' (single quote) becomes ' < (less than) becomes < > (greater than) becomes >
bold text. "; echo Htmlspecialchars ($STR);? > The HTML output of the above code is as follows (see source code): Bold text. Bold text.2. The Htmlspecialchars_decode () function converts some pre-defined HTML entities to characters (and Htmlspecialchars) function prototypes: Htmlspecialchars_decode (String, Quotestyle)
bold text. "; echo Htmlspecialchars_decode ($STR);?> the HTML output of the above code is as follows (view source): Bold text. The above code of the browser output: This is some bold text.
The above describes the PHP special character filtering, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.