Home> 类库下载> PHP类库> body text

PHP filters multiple spaces into one space preg_replace filters multiple spaces

高洛峰
Release: 2016-10-14 10:41:05
Original
1279 people have browsed it

preg_replace filters multiple spaces

$text = "ooo 我是 空格"; $text = preg_replace("/(\s+)/",' ',$text); echo $text;
Copy after login


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
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!