Home > Backend Development > PHP Tutorial > 去除一段字符串中间的 s

去除一段字符串中间的 s

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:40:43
Original
1277 people have browsed it

<code><td id="tdzymc" colspan="2">
<span id="lbl_zy">专业:</span>
                            <span id="lbl_zymc">财务管理</span>
</td>
</code>
Copy after login
Copy after login

这是一个表格里的原文

我按每行每列爬取后 就成了

<code>专业:
                            财务管理
</code>
Copy after login
Copy after login

求把它变成 专业:财务管理

回复内容:

<code><td id="tdzymc" colspan="2">
<span id="lbl_zy">专业:</span>
                            <span id="lbl_zymc">财务管理</span>
</td>
</code>
Copy after login
Copy after login

这是一个表格里的原文

我按每行每列爬取后 就成了

<code>专业:
                            财务管理
</code>
Copy after login
Copy after login

求把它变成 专业:财务管理

<code>$str = preg_replace('/\s/', '', $str);
</code>
Copy after login

http://3v4l.org/dNmnu#v5416

Related labels:
php
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 Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template