1, Strip_tags
Function: Remove HTML and PHP tags.
Syntax: string strip_tags (String str);
return value: String
Description: This function can remove any HTML and PHP tags contained in the string. If the HTML and PHP tags of the string are wrong, for example, less than the symbol is greater than the error will also be returned.
Note: When the refinement text is encountered, it will appear that the space is not replaced by the number of lines above, this time requires a separate use of str_replace for a specific replacement
2, Htmlspecialchars
Function: Converts special characters into HTML format.
Syntax: String htmlspecialchars (String string);
return value: String
This function converts special characters to HTML string format (&....;). The most commonly used occasion may be to deal with the message of the customer message version.
& (and) turn into & "(double quotation marks) turn into " < (less than) turn into < > (greater than) turn into >
This function converts only the above special characters, and does not convert all of the ASCII conversions specified by the HTML.