world!"); ?>]. The strip_tags() function can remove html, xml and PHP tags."/> world!"); ?>]. The strip_tags() function can remove html, xml and PHP tags.">
Home > Article > Backend Development > How to remove xml tags in php
php method to remove xml tags: [d5cb198d9387ad6674eb8917e4cd7826world!0d36329ec37a2cc24d42c7229b69747a"); ?>]. 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!