首頁  >  文章  >  後端開發  >  PHP去掉html中的空行、空白函数_PHP教程

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

WBOY
WBOY原創
2016-07-13 17:54:24927瀏覽

[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