tags:

views:

59

answers:

3

Hello,

I'm programming an invoice script. I'm looking for a php script that convert number to letter. Exemple, the invoice show this value : 155€

The script put automatically: ONE HUNDRED FIFTY FIVE

Any ideas ?

Thank you :)

+3  A: 

Can use

With Numbers_Words class you can convert numbers written in arabic digits to words in several languages. You can convert an integer between -infinity and infinity. If your system does not support such long numbers you can call Numbers_Words::toWords() with just a string.

With the Numbers_Words::toCurrency($num, $locale, 'USD') method you can convert a number (decimal and fraction part) to words with currency name.

Gordon
A: 

Or, if you don't have PEAR or don't want to use PEAR you can try:

http://www.krishnasrikanth.com/portfolio/myscripts/numbwordter_1.txt

Greetings, and good luck ;)

Stephen