note 67900 deleted from function.preg-replace by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 20:02:20 +0000 |
| Subject: | note 67900 deleted from function.preg-replace by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127699@lists.php.net to get a copy of this message | ||
Note Submitter: www.humer.biz
----
@Graham: Your function from march, 16th works only error free, if tag (if it is only one) in your
source is closed.
So I came along to add a pseudo-Tag around source and everything runs well ;)
function strip_styles($source=NULL)
{
# and pseudo-Tag
$source = '<parse>'.$source.'</parse>';
[...] rest of function
# and return it this way:
return
(str_replace(array('<parse>','</parse>'),"",$source));
}