Re: A loop for the hours in a working day

From: Date: Sun, 23 Nov 2003 15:52:05 +0000
Subject: Re: A loop for the hours in a working day
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170721@lists.php.net to get a copy of this message
Sorry, worked it out, here it is if anyone needs it :) $minutes = array("00", "15", "30", "45"); $hours = array("07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"); for ($x = 0; $x < 13; $x++ ) { for ($y = 0; $y < 4; $y++ ) { echo " <tr> <td>".$hours[$x].'.'.$minutes[$y]."</td> </tr>"; } } "Shaun" <shaun@mania.plus.com> wrote in message news:20031123153412.33222.qmail@pb1.pair.com... > Hi, > > I need a loop that will print the hours in a day separated by every fifteen > minutes between 0700 and 1900 e.g. > > 07:00 > 07:15 > 07:30 > 07:45 > 08:00 > 08:15 > ... > 19:00 > > How could I do this? > > Thanks for your help

« previous php.general (#170721) next »