标签: 首字母

PHP获取汉字拼音首字母

<?php
function getfirstchar($s0){
$fchar = ord($s0{0});
if($fchar >= ord(“A”) and $fchar <= ord(“z”) )return strtoupper($s0{0});
$s1 = iconv(“UTF-8″,”gb2312”, $s0);
$s2 = iconv(“gb2312″,”UTF-8”, $s1);
if($s2 == $s0){$s = $s1;}else{[……]

阅读全文»

鄂ICP备13000209号-1

鄂公网安备 42050602000277号