PHP code example of putheakhem / khmer-number-to-text

1. Go to this page and download the library: Download putheakhem/khmer-number-to-text 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/ */

    

putheakhem / khmer-number-to-text example snippets


use Putheakhem\KhmerNumberToText\Facades\KhmerNumber;

echo KhmerNumber::toText(1234);    // មួយពាន់ពីររយសាមសិបប្រាំបួន
echo KhmerNumber::toText('៦៧៨៩');  // ប្រាំមួយពាន់ប្រាំពីររយប៉ែតសិបប្រាំបួន...

echo khmer_number_to_text(2025); // ពីរពាន់ម្ភៃប្រាំ

echo khmer_number_to_text('១២៣៤'); // មួយពាន់ពីររយសាមសិបប្រាំបួន