PHP code example of milantarami / money-format

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

    

milantarami / money-format example snippets

 bash
$formatted = MoneyFormat::get('123456', 'np');
// output : 1,23,456.00
$formatted = MoneyFormat::get('123456', 'np', true);
//output : रू 1,23,456.00
$formatted = MoneyFormat::get('123456', 'np', true, 'NPR');
// output : NPR 1,23,456.00

$formatted = MoneyFormat::get('123456', 'us');
// output : 123,456.00