note 110844 deleted from function.strip-tags by danbrown
| From: | danbrown@php.net | Date: | Wed, 26 Dec 2012 17:54:52 +0000 |
| Subject: | note 110844 deleted from function.strip-tags by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192681@lists.php.net to get a copy of this message | ||
Note Submitter: jmshinn+phpdocs at gmail dot com
----
bzplan's function boiled down into a one-liner:
<?php
function rip_tags($string) {
return preg_replace('/\s+/', ' ',
preg_replace('/<[^>]*>/', ' ', $string));
}
?>