您的位置主页 > PHP

一个阿拉伯数字转中文数字的函数

最近因需要,写了个“阿拉伯数字转中文数字的函数”。搜索了精华区只见到一个类似的。感觉到我的算法不错,所以贴出来共享一下如果要用于金额的转换,对小数部分的处理要做一下修改<?phpfunction ch_num($num,$mode=true) {  $char = array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖");  $dw = array("","拾","佰","仟","","