PHP code example of nihar / num2word-bd
1. Go to this page and download the library: Download nihar/num2word-bd 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/ */
nihar / num2word-bd example snippets
use Nihar\Num2wordBd\Formatter;
// Instantiate the Formatter class
$formatter = new Formatter();
// Call the format method and pass the number you want to convert
$result = $formatter
->currency('TK')
->fractionCurrency('Paysa')
->joinSign('&')
->format(1234.56);
echo $result; // Outputs: "One Thousand Two Hundred Thirty Four TK & Fifty Six Paysa"