I am using the code below to echo the current month. How can i enhance it so that is shows all the months with the names and days and dates..
Code:
&
$daysArr = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun');
$monthtotdays= cal_days_in_month(CAL_GREGORIAN,date('m'),date("Y"));
$currdays=jddayofweek (cal_to_jd(CAL_GREGORIAN, date('m'),1, date("Y")) , 2 );
$currdaysval = 0;
echo "";
echo "";
for($d=0;$d<=6;$d++){
echo "". $daysArr[$d]." ";
if($daysArr[$d]==$currdays) $currdaysval = $d;
}
echo " ";
echo "";
if($currdaysval > 0 ){
echo ' ';
}
for($i=1;$i<=$monthtotdays;$i++){
echo "".$i." ";
if(($i+$currdaysval )%7 <= 0 ){
echo " ";
}
}
echo "
"