下面跟大家分享2种不同函数的实现方式。
ASP将数字转中文数字金额的函数一
<%
function Money(thenumber)
'dim Money,i,String1,String2,length,checkp'定义变量
dim one(),onestr()'定义数组
String1 = "零壹贰叁肆伍陆柒捌玖"
String2 = "万仟佰拾亿仟佰拾万仟佰拾元角分厘毫"
checkp=instr(thenumber,".")'判断是否含有小数位
if checkp0 then
PHP人民币金额转大写,其实质就是数字转换成中文大写,测试了一下,非常有趣,随便输个数字,就可以将其大写打印出来,初学的朋友们试一下吧
//PHP人民币金额转大写
class Ext_Num2Cny{
static $basical = array(0=>"零","壹","贰","叁","肆","伍","陆","柒","捌","玖");
static $advanced=array(1=>"拾","佰","仟");
public static function ParseN