Here is what i have for a 2 week Calendar.
<?php
$today=getdate();
//Start from Sunday
if($today[wday] > 0){
$start=mktime (0,0,0,date("m") ,date("d")-$today[wday],date("Y"));
}
//Create first week
$x = 0;
echo(' <TR valign="top" bordercolor="#000000" bgcolor="#FFFFFF">');
while ($x < 14){
if($x==7){
echo('</tr><TR valign="top" bordercolor="#000000" bgcolor="#FFFFFF">');
}
$check=date("Y-m-d",mktime (0,0,0,date("m",$start) ,date("d",$start)+$x,date("Y",$start)));
$day = date("d",mktime (0,0,0,date("m",$start) ,date("d",$start)+$x,date("Y",$start)));
$result = @mysql_query("SELECT ddate ,copp,nhome,ncon,iidgender,iidgame,nwooscore,noppscore FROM schedule WHERE iidgender=0 and iidtype=7 AND ddate='$check' ORDER BY ddate");
if (!$result) {
die('<p>Error retrieving data: ' . mysql_error() . '</p>');
}
if (mysql_num_rows($result) > 0) {
$copp = mysql_result($result,0,'copp');
$home=mysql_result($result,0,'nhome');
$con=mysql_result($result,0,'ncon');
$woo=mysql_result($result,0,'nwooscore');
$opp=mysql_result($result,0,'noppscore');
$res='';
$at='';
$b='';
$bb='';
if($woo > 0 and $opp > 0 ){
$wl='(Loss)';
if($woo > $opp){
$wl='(Win)';
}
$res=$woo.' - '.$opp.' '.$wl;
}
if(!$home ==0){
$at = ' at ';
}
if($con==1){
$b='<b>';
$bb='</b>';
}
echo('<td><div style="background-color: #ffffcc;font-weight: bold;">'."$day<br>$at$b$copp$bb<br>$res</div></td>");
}else{
echo("<td>$day<br><br></td>");
}
$x++;
}
echo('</tr');
?>
Would like it to now be Monday thru Saturday only and 1 week at a time.
Thanks in Advance for any code that can do it.