Код:
function vreme($mounth) {
$mounth = str_replace(1,'Януари', $mounth);
$mounth = str_replace(2,'Февруари', $mounth);
$mounth = str_replace(3,'Март', $mounth);
$mounth = str_replace(4,'Април', $mounth);
$mounth = str_replace(5,'Май', $mounth);
$mounth = str_replace(6,'Юни', $mounth);
$mounth = str_replace(7,'Юли', $mounth);
$mounth = str_replace(8,'Август', $mounth);
$mounth = str_replace(9,'Септември', $mounth);
$mounth = str_replace(10,'Октомври', $mounth);
$mounth = str_replace(11,'Ноември', $mounth);
$mounth = str_replace(12,'Декември', $mounth);
return $mounth;
}
Имам проблем с тази фунция - когато се подаде число от 1 до 9 - всичко е ОК.
Когато подам число над 9 - 10,11,12 тогава ми показва
Ако е 10 - Януари,
Ако е 11 - ЯнъариФевруари
Как да го направя да ми вади правилните месеци ако е подадено число > 10