PHP code example of cable8mm / n-format

1. Go to this page and download the library: Download cable8mm/n-format 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/ */

    

cable8mm / n-format example snippets


print NFormat::currency(358762);
// default locale = 'ko_KR' currency = 'KRW'
//=> ₩358,762

print NFormat::spellOut(5);
// default locale = 'ko_KR' currency = 'KRW'
//=> 오

NFormat::$locale = 'ja_JP';

print NFormat::spellOut(5);
//=> 五


print NFormat::decimal(12346);
//=> 12,346

print NFormat::percent(12346);
//=> 1,234,600%

print NFormat::rawPercent(12346);
//=> 12,346%


print NFormat::ordinalSpellOut(10);
//=> 열번째

print NFormat::currencySpellOut(12346);
//=> 12,346 원