I have two variables:
$start_time = '9:36';
$end_time = '12:47';
How would i calculate the amount of hours between the two times and store them in a variable like this:
$total_hours = 3;
I have read that you need to convert the times first. Also there will be no need for date as this will all be on the same day.
Any help would be appreciated
This solves your problem:
See this codepad for a proof.
This solution assumes both hours are from the same day.