Quick Search:
 
 PHP Code: Improved Strip_Tags() Jump to:  
Category: >> PHP Code >> Improved Strip_Tags()  

<< lastnext >>

Snippet Name: Improved Strip_Tags()

Description: An improved version of strip_tags().

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: February 27th, 2009

<?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;
 
?>


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org