note 94302 added to function.strip-tags
| From: | italoarg76 | Date: | Wed, 28 Oct 2009 12:39:37 +0000 |
| Subject: | note 94302 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162173@lists.php.net to get a copy of this message | ||
Sometimes... native strip_tags do not work for me so... I've made a new one:
function strip_tags2 ($str){
return preg_replace
('/(<[\/]{0,1}([a-z]{1,10})\s{0,}([^>]+)[^\/]{0,1}>)/is','',$str);
}
I hope you find it useful :)
--
Pablo Bozzolo
----
Server IP: 69.147.83.197
Probable Submitter: 190.188.122.183
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- https://master.php.net/note/edit/94302
Del: integrated -- https://master.php.net/note/delete/94302/integrated
Del: useless -- https://master.php.net/note/delete/94302/useless
Del: bad code -- https://master.php.net/note/delete/94302/bad+code
Del: spam -- https://master.php.net/note/delete/94302/spam
Del: non-english -- https://master.php.net/note/delete/94302/non-english
Del: in docs -- https://master.php.net/note/delete/94302/in+docs
Del: other reasons-- https://master.php.net/note/delete/94302
Reject -- https://master.php.net/note/reject/94302
Search -- https://master.php.net/manage/user-notes.php