note 70027 deleted from function.date by felipe

From: Date: Sat, 05 Jan 2008 01:56:12 +0000
Subject: note 70027 deleted from function.date by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134795@lists.php.net to get a copy of this message
Note Submitter: Mushy ---- Heres a basic print out of a calender: <? $date_month = 7; $date_year = 2006; $theday = date(w, mktime(0, 0, 0, $date_month, 1, $date_year)); $daysinmonth = date("t", mktime(0, 0, 0, $date_month, 1, $date_year)); echo "<table border=1>"; echo "<tr>"; echo "<td>Sunday</td>"; echo "<td>Monday</td>"; echo "<td>Tuesday</td>"; echo "<td>Wednesday</td>"; echo "<td>Thursday</td>"; echo "<td>Friday</td>"; echo "<td>Saturday</td>"; echo "</tr>"; echo "<tr>"; for ($i=0;$i<$theday;$i++) { echo "<td>&nbsp;</td>"; } for ($list_day=1;$list_day<=$daysinmonth;$list_day++) { echo "<td>" . $list_day . "</td>"; if ($theday == 6) { echo "</tr>"; echo "<tr>"; $theday = -1; } $theday++; } echo "</tr>"; echo "</table>"; ?>

« previous php.notes (#134795) next »