Jump to content

Archived

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

legohead6

calander syncro

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

Share this post


Link to post
Share on other sites
I don't understand your question.  Can you give a bit more detail?

Share this post


Link to post
Share on other sites
like right know the first sunday is 1 next sunday is 8 and so on... but what if the 1st of the month isnt a sunday? how do i make it so its correct?

Share this post


Link to post
Share on other sites

×

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.