Click to See Complete Forum and Search --> : Number Words


dyntryx
07-06-2005, 02:19 AM
So, I got bored and wrote out scripts that digitize text and textualize digits. What I mean by that is that it'll take input like "1236408" and produce "one million two hundred thirty six thousand four hundred eight" and vice-versa. There's a dumb function and a smart one. The smart one will actually compute things like you would normally, whereas the dumb one does more of a "one two three" is "1 2 3" type thing. The only other project I've seen like this is Pear's Number Words (http://pear.php.net/package/Numbers_Words). Anyone know any others? Also, I'm wondering, does the PEAR project require a php module for use? If so, I think it might be worth putting this script up for anyone else to use. For now I just needed some feedback on the general idea. Depending on that I'll post up the code here for critiquing. Thanks. :)

Weedpacket
07-07-2005, 09:25 AM
Well, it doesn't translate from words to numerals, but I wrote this function (http://www.phpbuilder.com/board/showthread.php?s=&threadid=10263559&) a while back for going the other (easier!) way.

does the PEAR project require a php module for use?Looking at it, I'd say no (can't think of any it would require).