Question: Hello, I have the following code to display a static web-based calendar (only for this month). As you see the output, it does not look

Hello,

I have the following code to display a static web-based calendar (only for this month).

As you see the output, it does not look like a calendar.

Could you please help me to change the CSS so that it will have the real calendar output?

Note: Let's start the week on Sunday. Since this month starts on Wednesday, let's empty the first three days.

In the second row, we will have 5, 6, 7,8 9, 10, 11 In the third row, 12, 13, 14, 15, 18,16,17,18 In the fourth row, 19,20,21, 22,23, 24, 25, in the last row, 26, 27, 28, 29, 30, 31, (the last box will be empty. )

Here is my code.

Office Hour Setup Form
'; /* Output the weekdays row */ echo '
'; foreach ($weekdays as $weekday) { echo '
' . $weekday . '
'; } echo '
'; /* Output the calendar days */ echo '
'; for ($i = 1; $i < $first_day; $i++) { // Output empty cells for days before the 1st echo '
'; } for ($day = 1; $day <= $days_in_month; $day++) { echo '
' . $day . '
'; } echo '
'; ?>

Thank you for your help.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!