A function that can convert Chinese characters into Pinyin _php tutorial

Source: Internet
Author: User
Many problems are caused by Chinese problems.
If the file name is best not in Chinese
Now the workaround is usually to generate an ID, which will be the file name
Web page if URL with Chinese characters also often error
Now the solution is generally encoded with UrlEncode
Now with this transformation, it's much better.
Principle: Using multidimensional arrays
1. Add an index
2. Iterating through an array
$d =array (
Array ("A",-20319),
Array ("AI",-20317),
Array ("an",-20304),
Array ("Ang",-20295),
Array ("AO",-20292),
Array ("BA",-20283),
Array ("Bai",-20265),
Array ("Ban",-20257),
Array ("Bang",-20242),
Array ("Bao",-20230),
Array ("Bei",-20051),
Array ("Ben",-20036),
Array ("Beng",-20032),
Array ("BI",-20026),
Array ("Bian",-20002),
Array ("Biao",-19990),
Array ("Bie",-19986),
Array ("Bin",-19982),
Array ("Bing",-19976),
Array ("Bo",-19805),
Array ("Bu",-19784),
Array ("Ca",-19775),
Array ("Cai",-19774),
Array ("Can",-19763),
Array ("Cang",-19756),
Array ("Cao",-19751),
Array ("Ce",-19746),
Array ("CEng",-19741),
Array ("Cha",-19739),
Array ("Chai",-19728),
Array ("Chan",-19725),
Array ("Chang",-19715),
Array ("Chao",-19540),
Array ("Che",-19531),
Array ("Chen",-19525),
Array ("Cheng",-19515),
Array ("Chi",-19500),
Array ("Chong",-19484),
Array ("Chou",-19479),
Array ("Chu",-19467),
Array ("Chuai",-19289),
Array ("Chuan",-19288),
Array ("Chuang",-19281),
Array ("Chui",-19275),
Array ("Chun",-19270),

http://www.bkjia.com/PHPjc/445588.html www.bkjia.com true http://www.bkjia.com/PHPjc/445588.html techarticle many problems are caused by the Chinese problem, such as the file name is best not in Chinese now the solution is generally generated an ID, will this ID do file name on the page if the URL with Chinese characters also often out ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.