最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个阿拉伯数字转中文数字的函数
时间:2022-07-02 10:08:40 编辑:袖梨 来源:一聚教程网
最近因需要,写了个“阿拉伯数字转中文数字的函数”。搜索了精华区只见到一个类似的。
感觉到我的算法不错,所以贴出来共享一下
如果要用于金额的转换,对小数部分的处理要做一下修改
function ch_num($num,$mode=true) {
$char = array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖");
$dw = array("","拾","佰","仟","","孺","
感觉到我的算法不错,所以贴出来共享一下
如果要用于金额的转换,对小数部分的处理要做一下修改
function ch_num($num,$mode=true) {
$char = array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖");
$dw = array("","拾","佰","仟","","孺","
相关文章
- “十月朝,糍粑碌碌烧”说的是小雪时节的哪一项习俗 蚂蚁庄园11月22日答案早知道 11-25
- 以闪亮之名宠物礼包怎么样 11-25
- 崩坏星穹铁道星期日用什么光锥 11-25
- 崩坏星穹铁道星期日用什么光锥 崩铁星期日光锥推荐搭配介绍 11-25
- 崩坏星穹铁道星期日技能机制怎么样 崩铁星期日技能机制介绍 11-25
- 崩坏星穹铁道星期日遗器怎么选择 崩铁星期日遗器推荐搭配介绍 11-25