note 19762 added to function.strip-tags
| From: | aktivisti at hotmail dot com | Date: | Sun, 10 Mar 2002 10:21:45 +0000 |
| Subject: | note 19762 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27575@lists.php.net to get a copy of this message | ||
There's a simple way to strip tags,
just replace all < > -marks with > and <.
$text = "somecomment <b>htmltest</b>";
$text = str_replace("<", "%gt;", $text);
$text = str_replace(">", "%lt;", $text);
$text is now "somecomment >b<htmltest>/b<" so in page it looks
like "somecomment <b>htmltest</b>".
--
http://www.php.net/manual/en/function.strip-tags.php
http://master.php.net/manage/user-notes.php?action=edit+19762
http://master.php.net/manage/user-notes.php?action=delete+19762
http://master.php.net/manage/user-notes.php?action=reject+19762