Convert numeric to letter
I'm programming an invoice script. I'm looking for a php script that convert number to letter. Exemple, 开发者_如何学JAVAthe invoice show this value : 155€
The script put automatically: ONE HUNDRED FIFTY FIVE
Any ideas ?
N.B: I find some script but i want one that support FRENCH letters.
Thank you :)
See:
- Convert numbers to letters
- Converting numbers to words in PHP
To convert to French with Numbers_Words
, you do:
// include class
include("Numbers/Words.php");
// create object
$nw = new Numbers_Words();
// convert to string
echo "3000000 in words is " . $nw->toWords(3000000, 'fr');
^
Language Specified
If you can't find a French script, take an English one and convert this to do what you're after - it'll be close enough to what you need, and should need little more than changing the number words to French.
精彩评论