Rumah > Artikel > pembangunan bahagian belakang > PHP去掉html中的空行、空白函数_PHP教程
[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);
}