les dejo el codigo
Código PHP:
while ($row = mysql_fetch_array($Recordset1, MYSQL_NUM))
{
//Se van agregando a $rangos los rangos existentes en la BD
array_push($rangos,$row);
}
function rangos($rangos,$fecha)
{
foreach ($rangos as $row)
{
$fecha1=strtotime($row[3]);
$fecha2=strtotime($row[4]);
if (($fecha >= $fecha1) || ($fecha <= $fecha2))
return (true);
}
return (false);
}
for($d = 1; $d <= 30; $d += 1){
$fecha33=strtotime("2008-$j-$d");
echo $fecha33;
echo $fecha44;
echo '<br/>';
if(rangos($rangos, $fecha)==true) {
echo "<div align=center style=color:red;background-color:pink id=$i> $d </div>";
echo '<br/>';}
}else {
echo '<div align=center style=color:red;background-color:pink id=$i> $d </div>';}
echo '<br/>';
}