note 102173 deleted from function.strip-tags by aharvey
| From: | aharvey@php.net | Date: | Thu, 20 Sep 2012 12:14:06 +0000 |
| Subject: | note 102173 deleted from function.strip-tags by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190924@lists.php.net to get a copy of this message | ||
Note Submitter: Montana
----
IMO, the function should allow you to remove any tag that you specify. The structure could be
something like this:
strip_tags($string,$allow_or_remove_listed,$list)
As an example:
<?php
$str = "<p><strong>This is a string.</strong> <a href="http://www.example.com/">Some Random
Website</a>";
$str = strip_tags($str,"remove","<strong>");
echo $str;
?>
would remove the <strong> tag.