PHP code example of mouson / chinese-numerals

1. Go to this page and download the library: Download mouson/chinese-numerals library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mouson / chinese-numerals example snippets


use Mouson\Helpers\ChineseNumericHelper;

$chinese = ChineseNumericHelper::Numeric2Chinese(123);
echo $chinese; \\ 一百二十三

$chinese = ChineseNumericHelper::Numeric2Chinese(123, true);
echo $chinese; \\ 壹佰貳拾參

use Mouson\Helpers\ChineseNumericHelper;

$chinese = ChineseNumericHelper::Numeric2Chinese(123);
echo $chinese; \\ 一百二十三

$chinese = ChineseNumericHelper::Numeric2Chinese(123, true);
echo $chinese; \\ 壹佰貳拾參