首页 >后端开发 >php教程 >PHP去掉html中的空行、空白函数_PHP教程

PHP去掉html中的空行、空白函数_PHP教程

WBOY
WBOY原创
2016-07-13 17:54:24959浏览

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/477966.htmlTechArticle[php] function DeleteHtml($str){ $str = trim($str); $str = ereg_replace(\t,,$str); $str = ereg_replace(\r\n,,$str); $str = ereg_replace(\r,,$str); $str = ereg_replace(\n,,$str); ret...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn