PHP strip_tags() Function

PHP strcspn() Function
PHP stripcslashes() Function

what is the syntax if the STRIP_TAGS() function in php?

strip_tags(string,allow)
ParameterDescription
stringRequired. Specifies the string to check
allowOptional. Specifies allowable tags. These tags will not be removed
PHP STRIP_TAGS() method

examples of the STRIP_TAGS() function

Example 1. In this example, we strip the string from HTML tags.

<?php
echo strip_tags("Hello <b>world!</b>");
?>

Example 2. In this example, we strip the string from HTML tags, but allow <b> tags to be used.

<?php
echo strip_tags("Hello <b><i>world!</i></b>","<b>");
?>
PHP strcspn() Function
PHP stripcslashes() Function

Stay up-to-date about PHP!

We don’t spam!

en English
X
Scroll to Top