sandy1028 Posted February 29, 2008 Share Posted February 29, 2008 Hi, I have the code below and I have the output in reverse order but if I use array_reverse($time_interval) it is not working Please help me list($year,$day,$month,$hour,$minute,$second) = explode(':', date('Y:m:d:H:i:s')); $minute = 60*(floor($minute/60)); $time_interval = array(); for($minutes=0; $minutes<=24*60; $minutes += 60) { $ti = date('H:i', mktime($hour,$minute-$minutes,$second,$month,$day,$year)); //array_reverse($time_interval); array_push($time_interval,$ti); //array_reverse($time_interval); } array_pop($time_interval); for($i=0;$i<count($time_interval);$i++){ print $time_interval[$i]."\n"; } Link to comment https://forums.phpfreaks.com/topic/93622-array_reverse-doesnot-work/ Share on other sites More sharing options...
trq Posted February 29, 2008 Share Posted February 29, 2008 What does not working meen? Were not mind readers. Link to comment https://forums.phpfreaks.com/topic/93622-array_reverse-doesnot-work/#findComment-479715 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.