Rauf
VIP Member
I need to split amount in words to print in pre printed bank form.
For example, the amount is 181,112.21 USD
The complete 'Amount in words' will be US DOLLAR ONE HUNDRED EIGHTY ONE THOUSAND ONE HUNDRED TWELVE AND 21/100 ONLY
In the pre printed form it should come in three lines. I cannot do word-wrap as it affects alignment. Instead I use three varaible (of size 30) to hold the three lines.
If I do a 'hard' split(using substr()), I will get the following lines
US DOLLAR ONE HUNDRED EIGHTY
ONE THOUSAND ONE HUNDRED TWE
LVE AND 21/100 ONLY
The line one is okay. But line two splits TWELVE to 'TWE' and 'LVE' which is not acceptable.
It should be like
US DOLLAR ONE HUNDRED EIGHTY
ONE THOUSAND ONE HUNDRED
TWELVE AND 21/100 ONLY
Is there anyway to do this by programming ?
For example, the amount is 181,112.21 USD
The complete 'Amount in words' will be US DOLLAR ONE HUNDRED EIGHTY ONE THOUSAND ONE HUNDRED TWELVE AND 21/100 ONLY
In the pre printed form it should come in three lines. I cannot do word-wrap as it affects alignment. Instead I use three varaible (of size 30) to hold the three lines.
If I do a 'hard' split(using substr()), I will get the following lines
US DOLLAR ONE HUNDRED EIGHTY
ONE THOUSAND ONE HUNDRED TWE
LVE AND 21/100 ONLY
The line one is okay. But line two splits TWELVE to 'TWE' and 'LVE' which is not acceptable.
It should be like
US DOLLAR ONE HUNDRED EIGHTY
ONE THOUSAND ONE HUNDRED
TWELVE AND 21/100 ONLY
Is there anyway to do this by programming ?