@@ -12,6 +12,8 @@ numbers including floats. A few examples.
1212
1313## Usage
1414
15+ ### Manual Installation
16+
1517** Clone this repository using git**
1618
1719``` bash
@@ -22,7 +24,7 @@ git clone git@github.com:swashata/php-number-to-word-india.git
2224
2325``` php
2426<?php
25- require_once 'ntwIndia/class-ntw-india .php';
27+ require_once 'src/NTWIndia .php';
2628```
2729
2830** Create an instance**
@@ -36,24 +38,24 @@ $ntw = new \ntwIndia\NTW_India();
3638
3739``` php
3840<?php
39- echo $ntw->num_to_word ( 3104007200 );
41+ echo $ntw->numToWord ( 3104007200 );
4042// Will print Three Hundred Ten Crore Forty Lakh Seven Thousand Two Hundred
4143```
4244
43- If your number is always less than 100, then use ` num_to_wd_small ` method to
45+ If your number is always less than 100, then use ` numToWordSmall ` method to
4446reduce memory usage.
4547
4648``` php
4749<?php
48- echo $ntw->num_to_wd_small ( 99 );
50+ echo $ntw->numToWordSmall ( 99 );
4951// Will print Ninty Nine
5052```
5153
5254## Methods
5355
5456Two methods are available
5557
56- ### ` num_to_word `
58+ ### ` numToWord `
5759
5860Converts any number to word including decimal values. Decimals are converted as
5961` ... And 986/1000 ` . You will mostly need to call this method.
@@ -67,10 +69,10 @@ Converts any number to word including decimal values. Decimals are converted as
6769Returns ` string ` The word value of the number. All of the words have uppercased
6870first letter.
6971
70- ### ` num_to_wd_small `
72+ ### ` numToWordSmall `
7173
7274Converts numbers smaller than 100 into words. If the number is greater than 99
73- then it simply calls ` num_to_word ` .
75+ then it simply calls ` numToWord ` .
7476
7577Use this when you know your number is lesser than 100 to reduce memory usage.
7678
@@ -93,7 +95,7 @@ To translate, kindly replace the public variables:
9395* ` $lakh ` : Lakh word. Defaults * 'Lakh'* .
9496* ` $crore ` : Crore word. Defaults * 'Crore'* .
9597* ` $and ` : And word. Defaults * 'And'* .
96- * ` $num_to_wd ` : Contains mapping of numbers to words. From ` 0 ` to ` 20 ` and multiple
98+ * ` $numToWord ` : Contains mapping of numbers to words. From ` 0 ` to ` 20 ` and multiple
9799 of ` 10 ` upto ` 90 ` .
98100
99101## Unit Test
0 commit comments