In our daily development work, many times we will encounter the conversion of RMB amount, the conversion of RMB in many places is essential, like in the major websites to pay, bank remittance and so on, all need the renminbi capital instead of Arabic numerals, so we have to convert the numbers into Chinese uppercase Chinese characters, Today we will show you how to achieve ~
The first step is to download the high-efficiency renminbi amount that we need to use in this lesson. PHP Class Library: http://www.php.cn/xiazai/leiku/795
The second step, after the download to find the PHP class files we need to compress to the local directory, create a new PHP file ~
In the third step, after creation, we call the class in the new file, and instantiate this class:
<?phpinclude_once "codermb.php"; Introduce class file $obj = new Ext_num2cny; Instantiate this type of $number = "123456789"; Defines the number//Output conversion content echo $obj->parsenumber ($number). " <br> "Echo $obj->int ($number)." <br> "Echo $obj->dec ($number)." <br> ";? >
The results of running this file are as follows: