what is the syntax if the STRIP_TAGS() function in php?
strip_tags(string,allow)
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
allow | Optional. Specifies allowable tags. These tags will not be removed |
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>");
?>