Home > Backend Development > PHP Tutorial > When php trim cannot handle Chinese half-width rounded corners and other spaces, trim enabler ltrim php php trim removes spaces.

When php trim cannot handle Chinese half-width rounded corners and other spaces, trim enabler ltrim php php trim removes spaces.

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 08:52:06
Original
1531 people have browsed it

Some Chinese half-width, rounded spaces or paragraph breaks are displayed as blank. Can be processed with regular expressions

<code>preg_replace("/(<span>\s</span>|<span>\&</span>nbsp<span>\;</span>| |<span>\xc</span>2<span>\xa</span>0)/","",<span>$content);</span></code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the content of trim and php when php trim cannot handle Chinese half-width rounded corners and other spaces. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
Front desk trim problem
From 1970-01-01 08:00:00
0
0
0
PHP trim unicode spaces
From 1970-01-01 08:00:00
0
0
0
Cannot read property 'trim' of undefined
From 1970-01-01 08:00:00
0
0
0
About trim function
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