PHP strip_tags () goes to the function of HTML, XML, and PHP tags in the string, Strip_tagsxml
Strip_tags Definition and usage
The Strip_tags () function strips the HTML, XML, and PHP tags from the string.
Note: This function always strips HTML comments. This cannot be changed by the Allow parameter.
Note: This function is binary safe.
Grammar
Strip_tags (String,allow)
Parameters |
Description |
String |
Necessary. Specifies the string to check. |
Allow |
Optional. Specifies the allowable label. These tags are not deleted. |
Technical details
return value: |
Returns the string that was stripped. |
PHP version: |
4 + |
Update log: |
Since PHP 5.0, this function is binary safe. from PHP 4.3, the function will always strip HTML comments. |
strip_tags Example 1,
Peel the HTML tags from the string:
world!");? >
Results
Hello world! 、
Example 2
Strip the HTML tags from the string, but allow labels to be used :
world!"," ");? >
Results
Hello world!
http://www.bkjia.com/PHPjc/1133113.html www.bkjia.com true http://www.bkjia.com/PHPjc/1133113.html techarticle php strip_tags () goes to the functions of HTML, XML, and PHP tags in strings, strip_tagsxml strip_tags definition and Usage strip_tags () function to strip the HTML, XML, and PHP from the string. .