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

WBOY
Release: 2016-07-13 17:54:24
Original
847 people have browsed it

[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.com true http://www.bkjia.com/PHPjc/477966.html TechArticle [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...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!