Numbers in lowercase.
Inspired by a habra and a post about Plural numbers .
I somehow had a task in PHP, in which it was required to locally display various huge numbers in lowercase, with tenths and thousandths. A classic wrote for this, a little clumsy in code, but it works stably and understands numbers like " 100300,3940023 " were displayed as " one hundred thousand three hundred and three million nine hundred forty thousand twenty three ten million ".
Using the classic is simple:
The class can be said from my resource: download (1.52 Kb)
Update: rub. download (1.53 Kb) is adapted for money + correction so that 0 is replaced by "zero".
I somehow had a task in PHP, in which it was required to locally display various huge numbers in lowercase, with tenths and thousandths. A classic wrote for this, a little clumsy in code, but it works stably and understands numbers like " 100300,3940023 " were displayed as " one hundred thousand three hundred and three million nine hundred forty thousand twenty three ten million ".
Using the classic is simple:
$out_string = NUM2STR::translate($string_number," и ",true);
The class can be said from my resource: download (1.52 Kb)
Update: rub. download (1.53 Kb) is adapted for money + correction so that 0 is replaced by "zero".