PHP Classes

PHP Number to Text Conversion: Convert numbers to text in English or Spanish

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 406 All time: 6,505 This week: 75Up
Version License PHP version Categories
num2text 1.0Freely Distributable5Localization, PHP 5, Text processing
Description 

Author

This package can convert numbers to text in English or Spanish.

It can take a given number and returns a string that spells that numbers with words.

There are two classes: one for converting to English and another to convert to Spanish. The classes can convert numbers of up to decillions.

Picture of kid goth
Name: kid goth <contact>
Classes: 1 package by
Country: Colombia Colombia
Age: ???
All time rank: 352318 in Colombia Colombia
Week rank: 312 Up4 in Colombia Colombia Up

Example

<?php

require_once './Num2TextEnglish.php';
$objNum2TextEng = new Num2TextEng();

echo
$objNum2TextEng->convertNumber(1000); // The output will be «one thousand»


// =========================

require_once './Num2TextSpanish.php';
$objNum2TextSpa = new Num2Text();

echo
$objNum2TextSpa->convertNumber(1000); // The output will be «mil»


  Files folder image Files  
File Role Description
Accessible without login Plain text file Example.php Example Example of use
Plain text file Num2TextEnglish.php Class Convert number to literal text in english.
Plain text file Num2TextSpanish.php Class Convertir de numero a texto en español.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:406
This week:0
All time:6,505
This week:75Up