Jump to content


Photo

calander syncro


  • Please log in to reply
3 replies to this topic

#1 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 15 September 2006 - 02:46 AM

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!
<?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++;
}
?>

and here it is in action http://splatmen.matt...om/calander.php
"Syntax error" .. WHERE THE **** IS IT?!

#2 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 15 September 2006 - 03:19 AM

I don't understand your question.  Can you give a bit more detail?

#3 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 15 September 2006 - 03:46 AM

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?
"Syntax error" .. WHERE THE **** IS IT?!

#4 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 15 September 2006 - 03:59 AM

NVM i got it!
"Syntax error" .. WHERE THE **** IS IT?!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users