PHP Classes

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

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 1,115 All time: 3,365 This week: 339Up
Version License Categories
numbers2words 1.0GNU General Publi...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: 46
All time rank: 2548 in The Netherlands The Netherlands
Week rank: 553 Down11 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  
This week:0
All time:3,365
This week:339Up
 User Ratings  
 All time