Pilli Posted April 13, 2006 Share Posted April 13, 2006 I have a form where I put in start time and end timeeg$start= 11:00;$end=16:30;What i would like to do is get the total number of hours eg. total hours between 11:00 and 16:30I tried $difference= $end-$start;echo "$difference";but I get the answer 5 when it should be 5:30I think I should be using the date function but not sure how to subtract two times. A point in the right direction would be most appreciated. Quote Link to comment Share on other sites More sharing options...
.josh Posted April 13, 2006 Share Posted April 13, 2006 [a href=\"http://us2.php.net/manual/en/function.time.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.time.php[/a] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.