Try this code for following purpose
Just Follow below step and you will Get day name from date in PHP or print all dates, days of current month
### Step1:
<?php
date_default_timezone_set('Asia/Kolkata');
$month = date('m');
$year = date('Y');
$cur_date = date('Y-m-d');
$d = $day_count =cal_days_in_month(CAL_GREGORIAN,$month,$year);
$cdate=date('d');
?>
### Step2:
<?php
$day = 1;
while($d){
?>
<p>
<?php
if($day=="$cdate") {
echo "<b>".$dated = ($day++.' '.(date("M Y")))."</b>";
}
else
{
echo $dated = ($day++.' '.(date("M Y")));
}
echo '('.$day_name = date('D', strtotime($dated)).')';
?>
</p>
<?php $d--; } ?>
Just use below code and modified according to your need. Note: this is very useful…