PHP code example of cleveregg-digital / number-to-words
1. Go to this page and download the library: Download cleveregg-digital/number-to-words 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/ */
cleveregg-digital / number-to-words example snippets
\NumberToWords::toWords(5120); // outputs "five thousand one hundred twenty"
\NumberToWords::toWords(5120, 'es'); // outputs "cinco mil ciento veinte"
\NumberToWords::toWords(512000, 'en', 'USD'); // outputs "five thousand one hundred twenty dollars"