I need a php script which shows all the hours from 01:00:00 to 24:00:00.
So far i have done this: (this code is in a while loop)
$hour++;
$hour_after_midnight = date('G:i:s',mktime(1,0,0,1,1,2011));
$next_hour = date($this_hour,strtotime('+1 hour'));
echo $next_hour;
but the above code returns:
1:00:00 x24times
I think that the date function i am using is wrong.
any help would be greatly appreciated
That’ll do it the way you are trying to do it? I assume you need the date variable to be in that form for a reason. Otherwise the comments are the way to go.