I've just been fixing up my PHP calendar code a little bit. After looking at Steven Rebello's code, I noticed that date() can return the number of days in the month... should have figured that in the first place. Also, I realized yesterday when skiing that my code didn't account for "empty days" at the end of the month after the last day. So while the resulting HTML looked right, I actually didn't complete the table correctly - so I'm fixing that too.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):