您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php怎么去掉字符串空行

2024/4/19 4:23:30发布15次查看
php去掉字符串空行的方法:1、创建一个php示例文件;2、通过“function deletehtml($str){...}”方法去掉html中的空行或空白即可。
本文操作环境: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); }
推荐学习:《php视频教程》
以上就是php怎么去掉字符串空行的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product