怎的截取中文字符串

WBOY
Release: 2016-06-13 12:21:03
Original
970 people have browsed it

怎样截取中文字符串?
0xa0判定没有效果,一个汉字是两个字符吗?

ord单个字符有值,chr却无法将值组合输出为汉字。

截取到的整段文字符串输出显示为乱码,单个字符截取输出的全是空白符。

中文截取要怎么弄???

------解决思路----------------------
iconv_substr
mb_substr
注意都要指明字符集
------解决思路----------------------
看下mb_string扩展

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template