note 30665 added to function.preg-replace
| From: | paul at NOSPAMatomicrevs dot co dot uk | Date: | Tue, 25 Mar 2003 10:35:41 +0000 |
| Subject: | note 30665 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45788@lists.php.net to get a copy of this message | ||
Strips out HTML tags...
This probably isn't the most elegant way of doing it (I'm new to PREGs) but it works!
$content = preg_replace("/<[a-z]+>/i",'', $content); // Remove opening
tags
$content = preg_replace("/<\/[a-z]+>/i",'', $content); // Remove closing
tags
Hope this helps somebody!
--
http://www.php.net/manual/en/function.preg-replace.php
http://master.php.net/manage/user-notes.php?action=edit+30665
http://master.php.net/manage/user-notes.php?action=delete+30665
http://master.php.net/manage/user-notes.php?action=reject+30665