How to get price amount in words


<?php
$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
echo $f->format(311.45);

//Output: three hundred eleven point four five

Note:- if intl extension is commented in php.ini file then You need to enable the intl extension in php just as the error says. In your php.ini file, uncomment the line extension=ext/php_intl.dll or something like this.

Advertisements