Home >Backend Development >PHP Tutorial >soapclient php split kanji

soapclient php split kanji

WBOY
WBOYOriginal
2016-07-29 08:40:02886browse

The first method:
Load the Encode module, provided that you need to install this module
Example code:

Copy the code The code is as follows:


$str=decode("gb2312",$names[$index ]);
@chars=split(//,$str);
foreach(@chars)
{
$char=encode("gb2312",$_);
print "ONE WORD:$charn";
}


The second method:
Chinese characters occupy 2 bytes, so you can use the following statement to get the Chinese characters directly. The code is as follows:
@chars=split(//,$names[$index]);
$str=$chars[0].$chars[1];

The above has introduced soapclient php split Chinese characters, including soapclient content. 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