$time = Whatever i want
$future_date = new DateTime(date('r',strtotime($time)));
$time_now = time();
$now = new DateTime(date('r', $time_now));
interval = date_diff($future_date, $now);
echo $interval->format('%H:%I');
When i run this... i get an output WITH days, you just cant see them. How can i roll the days into the hours (like to have 35 hours for example)?
This is part of a longer script im writing, im aware there are different ways of doing this....
EDIT
Using the answers below, i've come up with this:
$time = '2013-10-8 11:10:00';
$future_date = new DateTime($time);
$now = new DateTime();
$interval = date_diff($future_date, $now);
$text = $interval->days * 24 + $interval->h . ':' . $interval->i;
I'm trying to output the hours and minutes in this format (00:00), WITH leading zeros. Now out of my depth...