Holidays

PHP

Who has time to think about holidays? I guess, I do. Oh well. This application lists the annual holidays of the calendar of your choosing. I choose US holidays due to their relevance to me... Here is a screen shot.



Here is the code. &lt;?php # # # # # ?> &lt;?php $holiday = "US Holidays" ; ?> &lt;!-- Copyright 2010 by Alfred J Wheeler --> &lt;HTML> &lt;HEAD> &lt;TITLE>&lt;?php echo $holiday ?>&lt;/TITLE> &lt;/HEAD> &lt;BODY bgcolor=ivory text=darkblue> &lt;CENTER> &lt;P>&lt;BR> &lt;P>&lt;h1>Commonly recognized holidays in the U.S.A.&lt;/h1> &lt;P>&lt;BR> &lt;TABLE BGCOLOR=WHITE BORDER=3 CELLPADDING=6 CELLSPACING=3> &lt;TR>&lt;TD> &lt;TABLE BGCOLOR=WHITE BORDER=0 CELLPADDING=6 CELLSPACING=3> &lt;?php $records = file("../datafiles/calendar/calendar.usholiday"); foreach($records as $rec_num => $record) { list( $mmdd, $description ) = explode( "\t", $record ); if ( $description != "" ) { echo "&lt;TR>\n" ; echo "&lt;TD ALIGN=CENTER>$mmdd&lt;/TD>\n" ; echo "&lt;TD ALIGN=CENTER WIDTH=20> &lt;/TD>\n" ; echo "&lt;TD ALIGN=LEFT>$description&lt;/TD>\n" ; echo "&lt;/TR>\n"; } } ?> &lt;/TABLE> &lt;/TR>&lt;/TD> &lt;/TABLE> &lt;/CENTER> &lt;BR> &lt;/BODY> &lt;/HTML>
 * 1)  Author  :  Alfred Wheeler
 * 1)  Date    :  5/6/2010
 * 1)  Program :  holidays.php
 * 1)  Purpose :  List the annual US holday schedule.
 * 1) Get Holiday Information

This is a simple example. I just wanted to get my PHP pages started. Regardless, enjoy and HTH!