PHP extracts the Chinese initials. Copy the code as follows :? Functionpykey ($ py_key) {$ pinyin65536 + pys ($ py_key); if (45217 $ pinyin $ response) {$ zimuA; return $ zimu;} if (45253 $ pinyin $ pinyin45760) {$ zimu
The code is as follows:
Function pykey ($ py_key)
{
$ Pinyin = 65536 + pys ($ py_key );
If (45217 <= $ pinyin & $ pinyin <= 45252)
{
$ Zimu = "";
Return $ zimu;
}
If (45253 <= $ pinyin & $ pinyin <= 45760)
{
$ Zimu = "B ";
Return $ zimu;
}
If (45761 <= $ pinyin & $ pinyin <= 46317)
{
$ Zimu = "C ";
Return $ zimu;
}
If (46318 <= $ pinyin & $ pinyin <= 46825)
{
$ Zimu = "D ";
Return $ zimu;
}
If (46826 <= $ pinyin & $ pinyin <= 47009)
{
$ Zimu = "E ";
Return $ zimu;
}
If (47010 <= $ pinyin & $ pinyin <= 47296)
{
$ Zimu = "F ";
Return $ zimu;
}
If (47297 <= $ pinyin & $ pinyin <= 47613)
{
$ Zimu = "G ";
Return $ zimu;
}
If (47614 <= $ pinyin & $ pinyin <= 48118)
{
$ Zimu = "H ";
Return $ zimu;
}
If (48119 <= $ pinyin & $ pinyin <= 49061)
{
$ Zimu = "J ";
Return $ zimu;
}
If (49062 <= $ pinyin & $ pinyin <= 49323)
{
$ Zimu = "K ";
Return $ zimu;
}
If (49324 <= $ pinyin & $ pinyin <= 49895)
{
$ Zimu = "L ";
Return $ zimu;
}
If (49896 <= $ pinyin & $ pinyin <= 50370)
{
$ Zimu = "M ";
Return $ zimu;
}
If (50371 <= $ pinyin & $ pinyin <= 50613)
{
$ Zimu = "N ";
Return $ zimu;
}
If (50614 <= $ pinyin & $ pinyin <= 50621)
{
$ Zimu = "O ";
Return $ zimu;
}
If (50622 <= $ pinyin & $ pinyin <= 50905)
{
$ Zimu = "P ";
Return $ zimu;
}
If (50906 <= $ pinyin & $ pinyin <= 51386)
{
$ Zimu = "Q ";
Return $ zimu;
}
If (51387 <= $ pinyin & $ pinyin <= 51445)
{
$ Zimu = "R ";
Return $ zimu;
}
If (51446 <= $ pinyin & $ pinyin <= 52217)
{
$ Zimu = "S ";
Return $ zimu;
}
If (52218 <= $ pinyin & $ pinyin <= 52697)
{
$ Zimu = "T ";
Return $ zimu;
}
If (52698 <= $ pinyin & $ pinyin <= 52979)
{
$ Zimu = "W ";
Return $ zimu;
}
If (52980 <= $ pinyin & $ pinyin <= 53640)
{
$ Zimu = "X ";
Return $ zimu;
}
If (53689 <= $ pinyin & $ pinyin <= 54480)
{
$ Zimu = "Y ";
Return $ zimu;
}
If (54481 <= $ pinyin & $ pinyin <= 62289)
{
$ Zimu = "Z ";
Return $ zimu;
}
$ Zimu = $ py_key;
Return $ zimu;
}
Function pys ($ pysa)
{
$ Pyi = "";
$ I = 0;
For (; $ I <strlen ($ pysa); $ I ++)
{
$ _ Obfuscate_8w = ord (substr ($ pysa, $ I, 1 ));
If (160 <$ _ obfuscate_8w)
{
$ _ Obfuscate_Bw = ord (substr ($ pysa, $ I ++, 1 ));
$ _ Obfuscate_8w =$ _ obfuscate_8w * 256 + $ _ obfuscate_Bw-65536;
}
$ Pyi. = $ _ obfuscate_8w;
}
Return $ pyi;
}
$ Letter = pykey ("People's Republic of China ");
Echo $ letter;
?>
The http://www.bkjia.com/PHPjc/318921.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/318921.htmlTechArticle code is as follows :? Functionpykey ($ py_key) {$ pinyin = 65536 + pys ($ py_key); if (45217 = $ pinyin = 45252) {$ zimu = ""; return $ zimu;} if (45253 = $ pinyin = 45760) {$ zimu =...