PHP 过滤HTML代码空格,回车换行符的函数
PHP 过滤HTML代码空格,回车换行符的函数
PHP 过滤HTML代码空格,回车换行符的函数
/**
* PHP 过滤HTML代码空格,回车换行符的函数
* echo deletehtml()
*/
function deletehtml($str)
{
$str = trim($str);
$str=strip_tags($str,"");
$str=preg_replace("{\t}","",$str);
$str=preg_replace("{\r\n}","",$str);
$str=preg_replace("{\r}","",$str);
$str=preg_replace("{\n}","",$str);
$str=preg_replace("{ }","",$str);
return $str;
}
- 上一篇:UCenter 批量添加用户php
- 下一篇:PHP 截取中文字符
精彩图集
精彩文章






