Improved Strip_Tags()

Description: An improved version of strip_tags().

<?PHP
 
FUNCTION strip_tags_in_big_string($textstring){
WHILE($textstring != STRIP_TAGS($textstring))
   {
   WHILE (STRLEN($textstring) != 0)
         {
         IF (STRLEN($textstring) > 1024) {
             $otherlen = 1024;
         } ELSE {
             $otherlen = STRLEN($textstring);
         }
         $temptext = STRIP_TAGS(SUBSTR($textstring,0,$otherlen));
         $safetext .= $temptext;
         $textstring = SUBSTR_REPLACE($textstring,'',0,$otherlen);
         }
   $textstring = $safetext;
   }
RETURN $textstring;
 
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.