168;
$day_of_week = floor($hours / $hours_per_week);
$time = ($hours % $hours_per_week);
echo $days[$day_of_week] . " " . $time . ":00";
OP sunday 25:00 expected Monday 1:00
Try this: <?php $days = array('Sunday', 'Monday', 'Tuesday', 'Wednesday','Thursday','Friday', 'Saturday'); $hours = 25; $day_of_week = floor($hours / 24); $time = ($hours % 24); echo $days[$day_of_week] . " " . $time . ":00";
Обсуждают сегодня