php method to remove xml tags: [world!"); ?>]. The strip_tags() function can remove html, xml and PHP tags.
The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.
php provides us with a very convenient function, strip_tags(), with which we can easily delete html, xml and php tags.
Let’s take a look at a specific example:
Example 1
<?php echo strip_tags("Hello <b>world!</b>"); ?>
Output:
Hello world!
Example 2
<?php echo strip_tags("Hello <b><i>world!</i></b>","<b>"); ?>
Output:
Hello world!
Recommended learning: php training
The above is the detailed content of How to remove xml tags in php. For more information, please follow other related articles on the PHP Chinese website!