Home > Backend Development > PHP Tutorial > Introduction to PHP strip_tags() to remove HTML, XML and PHP tags_PHP tutorial

Introduction to PHP strip_tags() to remove HTML, XML and PHP tags_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:25:02
Original
807 people have browsed it

Syntax: strip_tags(string,allow);
string is required and specifies the string to be checked.
allow is optional and specifies allowed tags. These tags will not be deleted.
Note: This function will always strip HTML comments, which cannot be changed through the allow parameter.

Example:
$str = "Hello world!";
echo strip_tags($str);
echo '
';
echo strip_tags($str, '');
?>
Output result:
Hello world!
Hello world!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/825223.htmlTechArticleSyntax: strip_tags(string,allow); string is required and specifies the string to be checked. allow is optional and specifies allowed tags. These tags will not be deleted. Note: This function always strips...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template