sandy1028 Posted January 25, 2008 Share Posted January 25, 2008 Hi, When I print this code, the time in hours and minutes it is not exactly from the current time to previous one day. Please help me how to print the hours and minutes from current time to previous one day $time=array(); $t = time(); $t = floor($t/600)*600; for ($i = 0; $i < 24*6 ; $i++){ $t=date('H:i', $t - $i * 600); array_push($time,$t); } for($i=0;$i<=count($time);$i++){ print $time[$i]."\n"; } Quote Link to comment https://forums.phpfreaks.com/topic/87729-regarding-time-and-hour/ Share on other sites More sharing options...
rajivgonsalves Posted January 25, 2008 Share Posted January 25, 2008 what output are you expecting if you can give an example maybe I could cook up something.. Quote Link to comment https://forums.phpfreaks.com/topic/87729-regarding-time-and-hour/#findComment-448707 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.