PHP Classes

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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 (12 years ago) RSS 2.0 feedStarStarStar 53%Total: 1,105 All time: 3,217 This week: 1,052Up
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: 38
All time rank: 2428 in The Netherlands The Netherlands
Week rank: 1493 Down39 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,105All time:3,217
 This week:0This week:1,052Up
 User Ratings  
 All time