PHP code example of mwesigwajoshua / money-out-putter

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

    

mwesigwajoshua / money-out-putter example snippets



use mwesigwajoshua\MoneyOutPutter;

$amount = "1,000,000"; // Amount should be passed as a string
$currencyCode = 'UGX'; // ISO currency code for Ugandan Shillings

// Get formatted amount in words
$formattedAmount = MoneyOutPutter::useCode($currencyCode, $amount);
echo $formattedAmount; // Output: **One million Ugandan Shillings**


use mwesigwajoshua\MoneyOutPutter;

$amount = "1,000,000"; // Amount should be passed as a string
$currencyCode = 'UGX'; // ISO currency code for Ugandan Shillings

// Get formatted amount as figures with currency symbol
// **Note**: A **3rd argument** is passed as `true` to 



use  mwesigwajoshua\MoneyOutPutter;

$amount =  "5225.50"; //Please note: amount should be passed as a string
$Isonum = '800'; // 800 is Ugandan Shilling ISOnum

$formattedAmount = MoneyOutPutter::useISONum($Isonum, $amount);
echo $formattedAmount; //output: **Five Thousand Two Hundred Twenty Five Ugandan Shillings And Fifty Five Cents**

$formattedAmount = MoneyOutPutter::useISONum($Isonum, $amount, true);
echo $formattedAmount; //output: **USh 5,225.50**