legohead6 Posted September 15, 2006 Share Posted September 15, 2006 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]<?PHPrequire('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 Quote Link to comment Share on other sites More sharing options...
btherl Posted September 15, 2006 Share Posted September 15, 2006 I don't understand your question. Can you give a bit more detail? Quote Link to comment Share on other sites More sharing options...
legohead6 Posted September 15, 2006 Author Share Posted September 15, 2006 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? Quote Link to comment Share on other sites More sharing options...
legohead6 Posted September 15, 2006 Author Share Posted September 15, 2006 NVM i got it! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.