Jump to content

dislay time in a row


mraza

Recommended Posts

hi , how can i display time in a row which start from 6 in morning untell next day morning..

6.00 - 7.00
7.00 - 8.00
....
.....
and so on until next day
5.00-6.00

 

i tried this but i hope there is more effectives way and would loop until next day for 24 hours.

<?php for($i=8;$i<=23;$i++) {?>	
		<tr>
			<td><?php echo $i;?>.00-<?php echo $i+1;?>.00</td>
		</tr>
	<?php } ?>
	<?php for($i=0;$i<=7;$i++) {?>	
		<tr>
			<td><?php echo $i;?>.00-<?php echo $i+1;?>.00</td>
		</tr>
	<?php } ?>

thanks for any help 

Link to comment
https://forums.phpfreaks.com/topic/231436-dislay-time-in-a-row/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.