Jump to content

calander syncro


legohead6

Recommended Posts

Hi i have a working calander generator(32 days every week it moves down a line) but how do i make it make sense?

Ie today is thursday the 14th... and not another number....

heres the code!
[code]<?PHP
require('header.php');
session_start();
$day = array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
echo "<h3>";
echo date(F);
$date=date(F);
echo "<table border=1><tr>";
$s=0;
$d=0;
$r=0;
while(36 > $s){
echo "</tr><tr>";
while($d < $s){

if($d < 32){
$d++;
echo "<td>$day[$r] $d</td>";
$r++;
}else{
$d++;
echo "<td></td>";
$r++;
}
}
$r=0;
$s++;
$s++;
$s++;
$s++;
$s++;
$s++;
$s++;
}
?>[/code]

and here it is in action http://splatmen.mattswebpage.com/calander.php
Link to comment
https://forums.phpfreaks.com/topic/20815-calander-syncro/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.