PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 1,116 All time: 3,374 This week: 673Up
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: 47
All time rank: 2548 in The Netherlands The Netherlands
Week rank: 164 Up5 in The Netherlands The Netherlands Up

  Files folder image Files (3)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,116
This week:0
All time:3,374
This week:673Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:62%StarStarStarStar
Documentation:-
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2260