note 19762 added to function.strip-tags

From: 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 &gt; and &lt;. $text = "somecomment <b>htmltest</b>"; $text = str_replace("<", "%gt;", $text); $text = str_replace(">", "%lt;", $text); $text is now "somecomment &gt;b&lt;htmltest&gt;/b&lt;" 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

« previous php.notes (#27575) next »