note 19762 deleted from function.strip-tags by vrana

From: Date: Mon, 22 Dec 2003 15:44:26 +0000
Subject: note 19762 deleted from function.strip-tags by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62322@lists.php.net to get a copy of this message
Note Submitter: aktivisti@hotmail.com ---- 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>".

« previous php.notes (#62322) next »