<?php
// Staring straight up into the sky ... oh my my
/* Возвращает соответствующую числу форму слова: 1 рубль, 2 рубля, 5 рублей */
function inclineWord($number, $word1, $word2, $word5) {
/* DIY */
}
/*
Преобразует числа от 0 до 999 в текст. Параметр $isFemale равен нулю,
если мы считаем число для мужского рода (один рубль),
и 1 — для женского (одна тысяча)
*/
function smallNumberToText($number, $isFemale) {
0 => 'ноль', 10 => 'десять', 100 => 'сто',
1 => 'один', 11 => 'одиннадцать', 20 => 'двадцать', 200 => 'двести',
2 => 'два', 12 => 'двенадцать', 30 => 'тридцать', 300 => 'триста',
3 => 'три', 13 => 'тринадцать', 40 => 'сорок', 400 => 'четыреста',
4 => 'четыре', 14 => 'четырнадцать', 50 => 'пятьдесят', 500 => 'пятьсот',
5 => 'пять', 15 => 'пятнадцать', 60 => 'шестьдесят', 600 => 'шестьсот',
6 => 'шесть', 16 => 'шестнадцать', 70 => 'семьдесят', 700 => 'семьсот',
7 => 'семь', 17 => 'семнадцать', 80 => 'восемьдесят', 800 => 'восемьсот',
8 => 'восемь', 18 => 'восемнадцать', 90 => 'девяносто', 900 => 'девятьсот',
9 => 'девять', 19 => 'девятнадцать'
);
1 => 'одна', 2 => 'две'
);
/* DIY */
}
function numberToText($number) {
/* DIY */
}
/* Вызовем функцию несколько раз */
$text1 = numberToText($amount1);
echo "На вашем счету {$text1}\n";
$text2 = numberToText($amount2);
echo "На вашем счету {$text2}\n";
$text3 = numberToText($amount3);
echo "На вашем счету {$text3}\n";
$text4 = numberToText($amount4);
echo "На вашем счету {$text4}\n";
PD9waHAKCi8vIFN0YXJpbmcgc3RyYWlnaHQgdXAgaW50byB0aGUgc2t5IC4uLiBvaCBteSBteQplcnJvcl9yZXBvcnRpbmcoLTEpOwptYl9pbnRlcm5hbF9lbmNvZGluZygndXRmLTgnKTsKCgovKiDQktC+0LfQstGA0LDRidCw0LXRgiDRgdC+0L7RgtCy0LXRgtGB0YLQstGD0Y7RidGD0Y4g0YfQuNGB0LvRgyDRhNC+0YD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