This paper describes the method of getting the initials of Chinese characters by PHP custom function. Share to everyone for your reference, as follows: The initials are important and can be used for sorting. City list and so on. <?php/** Created on 2016-12-1*/function getfirstcharter ($STR) {if (empty ($STR)) {return ';} $fchar = Ord ($str {0}); I F ($fchar >= ord (' A ') && $fch
1. PHP Custom function to get the first letter of Chinese characters method
Introduction: This article describes a PHP custom function to get the first letter of the method. Share to everyone for your reference, as follows: The initials are important and can be used for sorting. City list and so on. <& #63;p hp/** Created on 2016-12-1*/function getfirstcharter ($STR) {if (empty ($STR)) {return ';} $fchar = Ord ($st R{0});
2. PHP gets the first letter of Chinese characters
Introduction: PHP Gets the first letter of Chinese characters
3. PHP implementation get the first letter of Chinese characters two instances _php tutorial
Introduction: PHP Implementation to get the first letter of Chinese characters two instances. To get the first letter of the method there are many, this we generally want to divide the Chinese characters and then converted to pinyin, and then use SUBSTR to take the first letter, below I found online two real
4. PHP to get the first letter of the function _php tutorial
Introduction: PHP Gets the function of the first letter of Chinese characters. Online methods have many, are the same principle, according to demand, did a version of the class file, the main function is: clear function, easy to modify maintenance and expansion; English strings
5. PHP gets the first letter of Chinese characters and sorts a lot of notic errors, the great God
Introduction: PHP Gets the first letter of Chinese characters and sorts a lot of notic errors, the great God
6. PHP implementation to get the first letter of Chinese characters two instances
Introduction: To get the first letter of the method there are many, this we generally want to divide the Chinese characters and then converted to pinyin, and then use SUBSTR to take the first letter, the following I found on the Internet two instances, different people together to see it.
7. How to get the first letter of Chinese character field in MySQL
Introduction: DROP FUNCTION IF EXISTS ' getpy '; DELIMITER;; CREATE FUNCTION ' getpy ' (in_string VARCHAR (65534)) RETURNS mediumtext CHARSET UTF8 BEGIN DECLARE tmp_str VARCHAR (65534) Cha RSet GBK DEFAULT '; #截取字符串, each time the intercepted string is stored in the variable,
8. Code-PHP to take the first letter of Chinese characters
Introduction: I found a library on the Internet, take the first letter of Chinese characters. One of the word conversions is wrong, and the first letter of "Dai" should be d, but it gives me a Z. The column 1 is the library I'm using http://www.111cn.net/phper/php-cy/53100.htm
9. PHP's function to get the initials of Chinese characters
Introduction: This article introduces the method of using PHP to convert Chinese characters into letters, the main function is: clear function, easy to modify maintenance and expansion; English strings: Unchanged returns (including numbers); Chinese string: Returns the first character of Pinyin;
_mysql the first letter of the Chinese character field in MySQL
Introduction: The first letter of each Chinese character field obtained in MySQL
"Related question and answer recommendation":
Code-PHP take Chinese characters first letter problem
PHP-Querying data based on letters I want to create a new field in the table save the first letter of each Chinese character how to get the initials of each Chinese character in MySQL