Strip_tags removes HTML and PHP tags. Syntax: stringstrip_tags (stringstr); Return Value: string type: description of data processing content htmlspecialchars converts special characters into HTML format. Syntax: stringhtmlspecialchars (stringstring); Return Value: string type: Data Processing
Strip_tags removes HTML and PHP tags. Syntax: string strip_tags (string str); Return Value: string correspondence type: description of data processing content htmlspecialchars converts special characters to HTML format. Syntax: string htmlspecialchars (string); Return Value: string function type: Data Processing
Strip_tags
Remove HTML and PHPMark.
Syntax: string strip_tags (string str );
Return Value: String
Correspondence type: Data Processing
Description
Htmlspecialchars
Convert special characters to HTML format.
Syntax: string htmlspecialchars (string );
Return Value: String
Correspondence type: Data Processing
This function converts special characters into the string format of HTML (&....;). The most common use case may be the message board for handling customer messages.
& (And) &
"(Double quotation marks)"
<(Less than) to <
> (Greater than) to>
This function only converts the preceding special characters and does not convert all the characters to the ASCII conversion specified in HTML.
Example
-
- $ New = htmlspecialchars ("Test", ENT_QUOTES );
- Echo $ new;
- ?>