PHP 清除HTML代码、空格、回车换行符的函数

        function DeleteHtml($str)  {   
         $str = trim($str);   
         $str = strip_tags($str,"");   
         $str = ereg_replace("\t","",$str);   
         $str = ereg_replace("\r\n","",$str);   
         $str = ereg_replace("\r","",$str);   
         $str = ereg_replace("\n","",$str);   
         $str = ereg_replace(" "," ",$str);   
          return trim($str);   
        }  

 

posted @ 2016-12-07 19:09  侠岚之弋痕夕  阅读(1743)  评论(0编辑  收藏  举报
Where is the starting point, we don't have a choice, but the destination where we can pursue!