0) { $output .= " point"; for($i = 0; $i < strlen($dec); $i++) $output .= " ".convertDigit($dec{$i}); } return $output; } function convertGroup($index) { switch($index) { case 11: return " decillion"; case 10: return " nonillion"; case 9: return " octillion"; case 8: return " septillion"; case 7: return " sextillion"; case 6: return " quintrillion"; case 5: return " quadrillion"; case 4: return " trillion"; case 3: return " billion"; case 2: return " million"; case 1: return " thousand"; case 0: return ""; } } function convertThreeDigit($dig1, $dig2, $dig3) { $output = ""; if($dig1 == "0" && $dig2 == "0" && $dig3 == "0") return ""; if($dig1 != "0") { $output .= convertDigit($dig1)." hundred"; if($dig2 != "0" || $dig3 != "0") $output .= " and "; } if($dig2 != "0") $output .= convertTwoDigit($dig2, $dig3); else if($dig3 != "0") $output .= convertDigit($dig3); return $output; } function convertTwoDigit($dig1, $dig2) { if($dig2 == "0") { switch($dig1) { case "1": return "ten"; case "2": return "twenty"; case "3": return "thirty"; case "4": return "forty"; case "5": return "fifty"; case "6": return "sixty"; case "7": return "seventy"; case "8": return "eighty"; case "9": return "ninety"; } } else if($dig1 == "1") { switch($dig2) { case "1": return "eleven"; case "2": return "twelve"; case "3": return "thirteen"; case "4": return "fourteen"; case "5": return "fifteen"; case "6": return "sixteen"; case "7": return "seventeen"; case "8": return "eighteen"; case "9": return "nineteen"; } } else { $temp = convertDigit($dig2); switch($dig1) { case "2": return "twenty-$temp"; case "3": return "thirty-$temp"; case "4": return "forty-$temp"; case "5": return "fifty-$temp"; case "6": return "sixty-$temp"; case "7": return "seventy-$temp"; case "8": return "eighty-$temp"; case "9": return "ninety-$temp"; } } } function convertDigit($digit) { switch($digit) { case "0": return "zero"; case "1": return "one"; case "2": return "two"; case "3": return "three"; case "4": return "four"; case "5": return "five"; case "6": return "six"; case "7": return "seven"; case "8": return "eight"; case "9": return "nine"; } } ?> Warning: main(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-4.0/DST' instead in C:\Apache\htdocs\vhosts\megadollardomains\htdocs\index.php on line 62 Fatal error: Call to undefined function number2string() in C:\Apache\htdocs\vhosts\megadollardomains\htdocs\index.php on line 62