Jasmine Wiki

Navigation

Wiki Home
Installing Framework
Configuring jasmine.php

Database Module
MySQL
Mysqlix
ODBC
MSSQL

Database Objects
Datagrid
Datasource
Repeater
SQLQuery

Files Module
File
FileSystem
FTP
Attachment
ExcelFile

Graphics Module
Color
Image
Graph


Miscellaneous
Classes:
NumbWordter
Email
Poll
Shield
XMLParser

Functions:
General Functions
HTML Functions
Validation Functions
TrackThisPage

 

NumbWordter

NumbWordter
NumbWordter is a number to word converter class written in php. This class will be useful to display numbers as words.

The class uses "million" terminology to name the number. [Thousand, million, billion, trillion, quadrillion, quintillion, sextillion, septillion, octillion, nonillion, decillion, unidecillion, duodecillion, tredecillion and quattuordecillion]

Instantiation
The class can be instantiated from the class name itself.
$nw=new NumbWordter;

Converting
The number to be converted into words is passed as parameter to convert() method. This will return the string of words generated from the number. If the length of number is more than 48, it will return an error.

echo $nw->convert(1524);
The above example will output - One thousand five hundred and twenty four.

PHP functions used:
- substr(), strrev(), strlen(), ucfirst() functions are used.

Known Bugs:

Alphanumeric input returns strange output
(c) 2008 Jasmine Framework. A Creation by Krishna Srikanth.