Time increment
| From: | Alan Todd | Date: | Wed, 01 Nov 2000 15:25:39 +0000 |
| Subject: | Time increment | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-23164@lists.php.net to get a copy of this message | ||
Fir some reason i am at a loss..
i am trying to show a table (tv guide) with time from date(g) - 2 hours
later incremented by 30 mintes ( 10:00 10:30 11:00 11:30)
i can do it by hour
function tillMidnight(&$d)
{
print date('g') . ':00';
print '<br>';
$hour_now = date('g')+1 > 12 ? (date('g')+1)-12 : date('g')+1;
while($hour_now <= 12)
{
?>
<td>
<?=$hour_now?> <br>
</td>
<?
$hour_now++;
}
}
Any tips here would be a great help
Alan