Re: Looking for Function / Procedure, best practices
| From: | Brian McGarvie | Date: | Thu, 12 Jun 2003 11:22:02 +0000 |
| Subject: | Re: Looking for Function / Procedure, best practices | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151226@lists.php.net to get a copy of this message | ||
> I am looking for something like strip_tags ($str, "<br><hr><i>")
> but in
> reverse operation.
> This will strip all tags except <br><hr><i> tags, but I need to strip
> these tags only (<br><hr><i>) keeping the rest unchanged.
You'll be wanting regular expressions then :)
http://uk2.php.net/ereg_replace
just build up an expression to replace <br><hr><i> &
</br></hr></i> with
nothing :)