<?php $month = 2; $year = 2017; $week = date("W", strtotime($year . "-" . $month ."-01")); Echo date("d/m/Y", strtotime($year . "-" . $month ."-01")) ." - "; $unix = strtotime($year."W".$week ."+1 week"); While(date("m", $unix) == $month){ Echo date("d/m/Y", $unix-86400) . "\n"; Echo date("d/m/Y", $unix) ." - "; $unix = $unix + (86400*7); } Echo date("d/m/Y", strtotime("last day of ".$year . "-" . $month));
You have javascript disabled. You will not be able to edit any code.