怎么去掉字符串的换行,tab 特殊字符?
怎么去掉字符串的换行,tab 特殊字符?
——解决方案——————–
str_replace(‘\n’,”,$content);
str_replace(‘\r’,”,$content);
str_replace(‘\t’,”,$content);
——解决方案——————–
$s='aa bb<p>+本文来源gao!%daima.com搞$代*!码9网(</p><strong>搞gaodaima代码</strong><br />cc';<br />echo preg_replace('/\s+/','',$s);
aabbcc