PHP code example of dev-scripts / english-nepali-number-converter-php
1. Go to this page and download the library: Download dev-scripts/english-nepali-number-converter-php 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/ */
dev-scripts / english-nepali-number-converter-php example snippets
echo Convert::toNp(123.33);
Output : "१२३.३३";
// with thousand count
$number = 123456789.05;
$numberThousandCount = number_format($number, 2);
echo Convert::toNp($numberThousandCount);
Output : "१२३,४५६,७८९.०५";
echo Convert::toEn("१२३४५६७८९.०५");
Output : 123456789.05;
echo Convert::toNp(123.33);
Output : "१२३.३३";
// with thousand count
$number = 123456789.05;
$numberThousandCount = number_format($number, 2);
echo Convert::toNp($numberThousandCount);
Output : "१२३,४५६,७८९.०५";
composer