PHP Classes

Words To Numbers: Convert a string of English words to numbers

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 537 All time: 5,584 This week: 299Up
Version License PHP version Categories
word-to-number 1.0GNU General Publi...4.0PHP 5, Text processing


This class convert a string of English words to numbers.

It can parse a string with words that spells a numeric value in English and retrieve the number that it represents.

Currently it convert strings that represent a number smaller than one thousand millions.

Innovation Award
PHP Programming Innovation award nominee
August 2011
Number 10
Some applications, in particular those that deal with documents that represent monetary values, need to spell a given amount in words of a given idiom.

This class can be used to do the opposite, i.e. take a string with English words that represent a number and parse it to determine what is the original value amount.

Manuel Lemos
Picture of Muhammad Arfeen
Name: Muhammad Arfeen is available for providing paid consulting. Contact Muhammad Arfeen .
Classes: 9 packages by
Country: Pakistan Pakistan
Age: 45
All time rank: 4614 in Pakistan Pakistan
Week rank: 578 Down11 in Pakistan Pakistan Down
Innovation award
Innovation award
Nominee: 5x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file wordtonumber.class.php Class Class File
Plain text file example.php Example example script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,584
This week:299Up
User Comments (1)
Very good
6 years ago (Mohammed Asad)