Login   Register  
PHP Classes
elePHPant
Icontem

SpellOutNumbers: Convert numbers to text, w/ or w/o ordinal suffix.

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   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2003-04-13 (11 years ago) RSS 2.0 feedStarStarStarStar 61%Total: 777 All time: 3,994 This week: 1,547Up
Version License Categories  
spelloutnumbers 1.0Free for non-commercial...Localization, Text processing
Description Author  

This is a tweaked and extended version of the "numbers2words" class.

The original class contained a couple of spelling errors ("fourty" and "eightteen"). It also added "and" too often ("two thousand and three hundred and twelve" instead of "two thousand three hundred and twelve"). Furthermore, it didn't hyphenate certain numbers ("twenty one" instead of "twenty-one").

Two options have been added:

You can choose whether you want ordinal suffixes added ("one" vs. "first")

You can choose whether you want the string capitalized ("two thousand and three" vs. "Two Thousand and Three")

Picture of DrDoc
Name: DrDoc <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 2410298 in United States United States
Week rank: 1848 Up202 in United States United States Up

  Files folder image Files  
File Role Description
Plain text file results.txt Output Examples
Accessible without login Plain text file spelloutnumbers.php Class The class itself
Plain text file syntax.txt Doc. Usage description

 Version Control Unique User Downloads Download Rankings  
 0%Total:777All time:3,994
 This week:0This week:1,547Up
 User Ratings  
 
 All time
Utility:91%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:75%StarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:748