Login   Register  
PHP Classes
elePHPant
Icontem

Numbers2words: Converts numbers to words (UK and US/FR)

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2003-04-26 (11 years ago) RSS 2.0 feedStarStarStar 53%Total: 1,102 All time: 3,134 This week: 1,428Up
Version License Categories  
numbers2words 1.0GNU General Public Lice...Text processing
Description Author  

Converts numbers to words.

Numbers range from 0 to 999.999.999.999.999

Note: argument to n2w is a string. Use strings for big number (usually bigger then 2^32) see example.php

For british (GB) numbers call with a optional second argument = 1.

British (GB)
n2w('1000000000',1) gives "one milliard"
n2w('1000000000000',1) gives "one billion"

American (US/FR)
n2w('1000000000') gives "one billion"
n2w('1000000000000') gives "one trillion"

Picture of Bas Jobsen
Name: Bas Jobsen <contact>
Classes: 9 packages by
Country: The Netherlands The Netherlands
Age: 37
All time rank: 2326 in The Netherlands The Netherlands
Week rank: 1734 Down49 in The Netherlands The Netherlands Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example example
Accessible without login Plain text file licence.txt Lic. licence
Plain text file numbers2words.php Class numbers2words

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,102All time:3,134
 This week:0This week:1,428Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:62%StarStarStarStar
Documentation:-
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:1400