I have the result in decimal or integer of the hours:
Utilizador 1 = 71.5 horas Utilizador 2 = 137 horas
I wanted to convert within php for hours, as an example:
Utilizador 1 = 71:30 Utilizador 2 = 137:00
I'm using this code in while
to reach the decimal or integer hours:
$Total = 0;
while ($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
$teste = $rows_cursos['Horas Consumidas'];
$tempo = explode(":", $teste);
$tempototal = $tempo[0]*60 + $tempo[1];
$Total = $Total + $tempototal;
}
$Total = $Total/60;