first day of the first week of $selectedMonth $selectedYear is $firstday (from 0 to 6)

\n"); print("The last day of $selectedMonth $selectedYear is $lastday\n

"); } $days[0] = 'Sun'; $days[1] = 'Mon'; $days[2] = 'Tue'; $days[3] = 'Wed'; $days[4] = 'Thu'; $days[5] = 'Fri'; $days[6] = 'Sat'; $dayRow = 0; print(""); print(""); print("\n"); for($i=0; $i<=6; $i++) { print("\n"); } print("\n"); print("\n"); while($dayRow < $firstday) { print(""); $dayRow += 1; } $day = 0; if($frametarget) { $targetString = 'target = '.$frametarget; } else { $targetString = ''; } while($day < $lastday) { if(($dayRow % 7) == 0) { print("\n\n"); } $adjusted_day = $day+1; print(""); $day += 1; $dayRow += 1; } print("\n\n
$monthName $selectedYear
$days[$i]
$adjusted_day
\n"); # print("$selectedMonth"); ?>