Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?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"; } ?>
Copy Clear