PHP code example of s1k3 / bangla-number-to-word

1. Go to this page and download the library: Download s1k3/bangla-number-to-word 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/ */

    

s1k3 / bangla-number-to-word example snippets


number_to_word("1556.62","bn"); //এক হাজার পাঁচশত ছাপ্পান্ন টাকা বাষট্টি পয়সা

number_to_word("155342262");//পনের কোটি তিপ্পান্ন লক্ষ বিয়াল্লিশ হাজার দুইশত বাষট্টি টাকা

number_to_word("15262","en");//fifteen thousand two hundred sixty-two taka

return [
    'language' => 'bn',
    'unit' => [
        'en' => 'taka',
        'bn' => 'টাকা'
    ],
    'units' => [
        'en' => [
            'crore' => 'crore',
            'lac' => 'lac',
            'thousand' => 'thousand',
            'hundred' => 'hundred',
            'paisa' => 'cent'
        ],
        'bn' => [
            'crore' => 'কোটি',
            'lac' => 'লক্ষ',
            'thousand' => 'হাজার',
            'hundred' => 'শত',
            'paisa' => 'পয়সা'
        ]
    ]
];

 php
 'providers' => [
        S1K3\Bangla\Number\To\Word\NumberToWordServiceProvider::class
 ]
 
 php
php artisan vendor:publish --provider="S1K3\Bangla\Number\To\Word\NumberToWordServiceProvider"