Ok I've worked a bit more on it and tried to make it easier to debug:
$row = mysql_fetch_array($rs, MYSQL_NUM);
for($j=1;$j<6;$j++){
if($BeginWeek==$setMonth||$EndWeek==$setMonth){
switch(date("w",strtotime($CurrentDate))){
case 0:
$DaysToAd=array("","+1 days","+2 days","+3 days","+4 days","+5 days","+6 days");
break;
case 1:
$DaysToAd=array("-1 days","","+1 days","+2 days","+3 days","+4 days","+5 days");
break;
case 2:
$DaysToAd=array("-2 days","-1 days","","+1 days","+2 days","+3 days","+4 days");
break;
case 3:
$DaysToAd=array("-3 days","-2 days","-1 days","","+1 days","+2 days","+3 days");
break;
case 4:
$DaysToAd=array("-4 days","-3 days","-2 days","-1 days","","+1 days","+2 days");
break;
case 5:
$DaysToAd=array("-5 days","-4 days","-3 days","-2 days","-1 days","","+1 days");
break;
case 6:
$DaysToAd=array("-6 days","-5 days","-4 days","-3 days","-2 days","-1 days","");
break;
}
$WriteMonth.="<tr>";
for($i=0;$i<7;$i++){
$strTemp="";
$curDate = date("m/d/y",strtotime ("$CurrentDate $DaysToAd[$i]"));
echo $curDate." ";
echo "checking (";
echo in_array($curDate, $row).") ";
if (in_multi_array($curDate, $row)) {
$BGcolor="111111";
} else {
$BGcolor="000000";
}
echo "<br>";
}
}
echo "<br>03/18/03 and 03/25/03 should also have (1) because they are in the row array as well";
Here is the site with the debug example
I'm sorry for all of the code but I figure it's best if you know exactly what's going on. As far as I can tell it should check the array for $curDate every time it loops through the nested for loop. It seems to be doing that, but only checking against the 1st value of the array which is "03/16/03" I'm confused he he.
Boo