(edito) me funcionó:
Código PHP:
$horaInicio = "7:00";
$horaFinal = "21:45";
$arrayInicio = explode(":", $horaInicio);
$arrayFinal = explode(":", $horaFinal);
$timeInicio = mktime($arrayInicio[0], $arrayInicio[1]);
$timeFinal = mktime($arrayFinal[0], $arrayFinal[1]);
<?php
while($timeInicio <= $timeFinal) {
// echo date("H:i", $timeInicio) . "<br />\n";
?>
<?php
//marcador de hora
$a = date("H:i", $timeInicio);
list($hora, $minut) = split('[:]', $a);
$b=date("H:i", mktime($hora, $minut+15, 0));
$ahora = date("H:i");
if($a>=$ahora || $ahora>=$b){
$bghora='#FFFFFF';
}
else{
$bghora='#FFCACA';
}
?>
<tr>
<td height="1" colspan="15" bgcolor="#333333"></td>
</tr>
<tr>
<td align="center" bgcolor="<?php echo $bghora; ?>" class="fontHora"><?php echo date("H:i", $timeInicio); ?></td>
<?php
}
?>
</tr>
<?php
$timeInicio = $timeInicio + (60 * 15);
}
?>