<?php $today = strtotime(date('2018-02-09')); $ym = strtotime(date('Y-m')); $day_count = date('t'); for ( $day = 1; $day <= $day_count; $day++) { $date = strtotime(date($ym.'-'.$day)); if ($today == $date) { echo "today \r\n"; echo $date. "\r\n"; echo $today. "\r\n"; } elseif ($today > $date) { echo "PAST \r\n"; echo $date. "\r\n"; echo $today. "\r\n"; } else { echo "FUTURE \r\n"; echo $date. "\r\n"; echo $today. "\r\n"; } }
You have javascript disabled. You will not be able to edit any code.