Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$week_days = [
"Воскресенье",
"Понедельник",
"Вторник",
"Среда",
"Четверг",
"Пятница",
"Суббота",
];
date_default_timezone_set("Europe/Moscow");
$startdate = strtotime("first day of +2 month");
$month = date("m", $startdate);
if ($month == 03) {
echo "Март" . "\n";
}
$enddate = strtotime("last day of +2 month");
$array = [];
for ($i = $startdate; $i <= $enddate; $i += 86400) {
$array[] = date("d ", $i) . $week_days[date("w", $i)];
}
foreach ($array as $row) {
echo $row . "\n";
}
?>