strip_tags and allowable_tags?
| From: | Andrew Elliston | Date: | Sun, 12 Nov 2000 04:16:55 +0000 |
| Subject: | strip_tags and allowable_tags? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24834@lists.php.net to get a copy of this message | ||
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);
but this just strips all of the tags off the string, displaying text
<http://php.net/manual/function.strip-tags.php>
doesn't include a clear example.
Thanks,
Andrew Elliston
-------------------------------------------------------------------------
"Will this bug be fixed, or is it needed for some other functionality?"
-- a new Microsoft Office 2001 user