php简单的获得汉字的第一个拼音字母的函数: ?phpfunction getFirstChar($string) {$firstCharOrd = ord(strtoupper($string{0}));if (($firstCharOrd = 65 $firstCharOrd = 91) || ($firstCharOrd = 48 $firstCharOrd = 57))return strtoupper($string{0});

php简单的获得汉字的第一个拼音字母的函数:

= 65 && $firstCharOrd = 48 && $firstCharOrd =- 20319 && $asc =- 20283 && $asc =- 19775 && $asc =- 19218 && $asc =- 18710 && $asc =- 18526 && $asc =- 18239 && $asc =- 17922 && $asc =- 17417 && $asc =- 16474 && $asc =- 16212 && $asc =- 15640 && $asc =- 15165 && $asc =- 14922 && $asc =- 14914 && $asc =- 14630 && $asc =- 14149 && $asc =- 14090 && $asc =- 13318 && $asc =- 12838 && $asc =- 12556 && $asc =- 11847 && $asc =- 11055 && $asc 
登录后复制
  • 相关:ord() 函数返回字符串第一个字符的 ASCII 值。

原文地址:php简单的获得汉字的第一个拼音字母, 感谢原作者分享。

09-16 12:15