Hi
Can anybody help me plz.
I need a script to convert numbers to words.
For ex.
for 1452.23
It should give One thousand four hundred fifty two and twenty three cents only
Thanks
Hi
Can anybody help me plz.
I need a script to convert numbers to words.
For ex.
for 1452.23
It should give One thousand four hundred fifty two and twenty three cents only
Thanks
Sounds like you should try to do your homework.
Also check out Weedpacket's thread here.
You could use the PEAR Numbers_Words package (beta):
<?php
require_once 'Numbers/Words.php';
$nw = new Numbers_Words();
$num = 12345;
echo $nw->toWords($num);
?>
Thanks Kudose
I really did my homework and solved this problem by my own.
Awesome, I'm glad to see someone actually taking my advice instead of criticizing me for it.
bradgrafelman;10910202 wrote:Also check out Weedpacket's thread here.
An admin once asked for forum features / requests a while back (sometime between mid to late 2008 I believe). And I suggested a code repository. That is to say, a forum (controlled by mods only) that contained a collection of scripts (that are well structured, clean and efficient and do the job perfectly) that users can browse and use.
I think the idea was well received. This link would be an example that would serve that well. As it stands, there are god knows how many good scripts that are buried within discussion threads everywhere that (in one capacity or another) would help members out if they only knew of their existence and where they are located).
EDIT - Sure, there's the search function.. but I think the repository idea would still be better.
I think that would be pretty nifty too.