1. Computing & Technology

Discuss in my forum

Simple PHP Calendar

By , About.com Guide

5 of 5

Finishing the Calendar
 //Finaly we finish out the table with some blank details if needed
while ( $day_count >1 && $day_count <=7 )
{
echo "<td> </td>";
$day_count++;
}
echo "</tr></table>";
To finish our calendar we use one last while loop. This one fills in the rest of our calendar with blank table details if needed. Then we close our table and our script is done. View Full Calendar Code.

[See working calendar example]

©2012 About.com. All rights reserved.

A part of The New York Times Company.