本文操作环境:Windows7系统、PHP7.1版、DELL G3电脑
php怎么去掉字符串空行?
PHP去掉html中的空行、空白函数
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);
}