The logic about number to text conversion is separate number in parts to translate to this word. Example: 329
- 3 = hundred part
- 2 = ten part
- 9 = unit part
If number is teen like have sub section for this. Example: 916
- 9 = hundred part
- 16 = tens ten part
If section doesn't exists, will not have part. Example 206
- 2 = hundred part
- 0 = nothing
- 6 = unit part
For thousands is same thing with your separated parts to works with your sufix (mil, million, billion, etc). Example: 21911
- 2 = ten thousands part
- 1 = unit thousands part
- 911 = solved above
Hmm, probably I can move $tens_ten array data info $units