php - Numbers to text
PHP中文网
PHP中文网 2017-06-13 09:22:16
0
2
897

How to quickly convert numbers into text
For example, 1 => one, 2=> two, ..., 15=》Fifteen
What I am currently thinking about is to save Chinese characters into a In array

$arr = ['一','二','三','四','五','六','七','八','九','十'];

But this is too troublesome
How to convert the input numbers into Chinese? Is there an easier way?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all (2)
代言

Too free,,,,,,,,,,,,,,,,,,,,,,

    phpcn_u1582

    Why not use key-value pairs

    $arr = [ 1=>'一', 2=>'二' ];
      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!