0){ for ($i=0; $i<$day_of_wk; $i++) { echo ""; } } for ($date_of_mth = 1; $date_of_mth <= $day_in_mth; $date_of_mth++) { if ($day_of_wk = 0){ for ($i=0; $i<$day_of_wk; $i++); { echo ""; } } $day_text = date(D, mktime(0, 0, 0, $monthno, $date_of_mth, $year)); $date_no = date(j, mktime(0, 0, 0, $monthno, $date_of_mth, $year)); $day_of_wk = date(w, mktime(0, 0, 0, $monthno, $date_of_mth, $year)); if ( $date_no == date(j) && $monthno == date(n) ) { echo ""; } else{ echo ""; } If ( $day_of_wk == 6 ) { echo ""; } If ( $day_of_wk < 6 && $date_of_mth == $day_in_mth ) { for ( $i = $day_of_wk ; $i < 6; $i++ ) { echo ""; } echo ""; } } ?>
SunMonTueWedThuFri Sat
 
".$date_no."".$date_no."