i am implementing one application in which i have to display a time difference in total hour from end date to start date. suppose i have both start date and end date in timestamp.so how i will get the difference of date in total hour ? now i am using the below code
$intervalo = date_diff(date_create(), date_create($end));
pr($intervalo);
and the output is like
DateInterval Object
(
[y] => 0
[m] => 1
[d] => 4
[h] => 18
[i] => 41
[s] => 2
[invert] => 0
[days] => 34
)
the above code show me the total hour baut the end date is greater then 1month it shows 1m in array . but i only want total number of hour only can any one help me ? thanks in advance