RE: [PHP] strip_tags and allowable_tags?
| From: | Maciek Uhlig | Date: | Sun, 12 Nov 2000 08:39:26 +0000 |
| Subject: | RE: [PHP] strip_tags and allowable_tags? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24845@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Andrew Elliston [mailto:elists@elliston.net]
> Sent: Sunday, November 12, 2000 5:17 AM
> To: Php ((E-Mail))
> Subject: [PHP] strip_tags and allowable_tags?
>
>
> Does anyone have a simple example of using strip_tags with the
> optional allowable_tags?
> For instance, what would the syntax be if you wanted to strip the
> HTML tags from a string, but leave the <b> tags in?
>
> I can't seem to find an example anywhere online, and can't guess
> the syntax. I thought it would be something similar to:
> $string = <b><i>test</i></b>;
> echo strip_tags($string, b);
$body=strip_tags($body,"<P>,<I>,<B>");
Maciek