Category Covered

List of all day name in a month in PHP

You can get all the day name on a month in PHP by using the followince PHP code

 

$from_date = date('d-m-Y');
$to_date = date('d-m-Y', strtotime('+1 month'));
		
$from_date = new DateTime($from_date);
$to_date = new DateTime($to_date);
		
for ($date = $from_date; $date <= $to_date; $date->modify('+1 day')) {
echo $date->format('l') . "\n";
}