Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

Students also viewed these Databases questions