I have one problem, as i calculate two time like today i have worked 9.43 hours and 2nd day i worked 8.20 hours when i calculate total time of these two day then it shows 17.63 hours but i want to show this with the help of php , this should come as like 18.03 hours.

How i can do this , please help me.


Just use the following code. Simple and easy to use.

//set the values

//now to calculate
    } else {
    if ($valuesplit[1]>=60)

//now to echo the value
echo $endvalue;

change the separator to :
strtotime functions think that x.y is a fraction x:y is a time
$a = 9.43 = 9:25
$b = 8.20 = 8:12
= 17.63 = 17:37

You want
$a = 9:43
$b = 8:20
= 18:03
then you can just add the hours with mktime(strtotime($a + $b))