note 23740 deleted from function.strip-tags by vrana

From: Date: Mon, 22 Dec 2003 16:13:28 +0000
Subject: note 23740 deleted from function.strip-tags by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62327@lists.php.net to get a copy of this message
Note Submitter: calinatphp9.com ---- Hi, Maybe this is useless but here is a code sequence that does the same in PHP: $sStripped = ''; $bInside = false; $iDepth = 0; for ($iStripHtml = 0 ; $iStripHtml<$sLength; $iStripHtml++) { if ($sContent[$iStripHtml] == '<') { $bInside = true; $iDepth++; } if ($sContent[$iStripHtml - 1] == '>' && ! (--$iDepth)) { $bInside = false; } if (!$bInside) { $sStripped .= $sContent[$iStripHtml]; } } $sContent = $sStripped; echo '<hr>'; echo $sContent;

« previous php.notes (#62327) next »