PHP实现中文按照拼音字母排序
下面是一个使用PHP实现中文按照拼音字母排序的完整源码示例:
<?php
/**
* 获取中文字符串的首字母
* @param string $str 中文字符串
* @return string 首字母
*/
function getFirstLetter($str)
{
if (empty($str)
<?php
/**
* 获取中文字符串的首字母
* @param string $str 中文字符串
* @return string 首字母
*/
function getFirstLetter($str)
{
if (empty($str)