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
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:52:061532browse

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>
').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.

Statement:
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