In your version it will work if you add below:
$wdRu = Array('Воскресенье','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота'); for ($i=0;$i<sizeof($dates);$i++) { $weekDay[$i] = date('w',strtotime(str_replace(',','.',$dates[$i]).'.11')); $out .= $wdRu[$weekDay[$i]].' '.$dates[$i].' '; }
With this approach, you can use the design
$wdRu[$weekDay[$i]]
to display the Russian name of the day of the week, in your cycle, where you need it, because its iterator will be equal to an iterator in $ dates
PS: By the way, your approach will only work for this year, since the numbers $ 24.09 are recorded in $ dates; 25.09, etc.
PPS: look at this topic here Array of dates in PHP