当前位置:Gxlcms > PHP教程 > PHP去掉html中的空行、空白函数_PHP教程

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

时间:2021-07-01 10:21:17 帮助过:13人阅读

[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...

人气教程排行