
php语法如何利用str_replace和strip_tags去掉连续空格,下面web建站小编给大家详细介绍一下!
去除空格代码如下:
<?php
$note = strip_tags($value['Content']);
$note = trim($note);
$note = str_replace(" ","",$note);
$note = preg_replace('#\s+#', ' ',trim($note));
$note = str_replace("<","<",$note);
$note = str_replace(">",">",$note);
$note = preg_replace("/[ ]{1,}/isu"," ",$note);
echo getsubstr($note,100);
?>
标签: str_replace, strip_tags
上面是“php语法如何利用str_replace和strip_tags去掉连续空格”的全面内容,想了解更多关于 php入门 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_2656.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

蜜蜂试卷APP最新版
wordpress如何设置自定义重新规则
css3搭积木叠加图形
推荐2款充满科技感的艺术字体——小新黑体、小新潮酷体