I have a php
query that is getting a field from my database that contains an int, for example 7800. I know that 7800 is 7.7 seconds or 0.13 minutes.
I need a way to display this as 00:00:08
(rounded up)
The table print out looks like this:
<td><?= $row["timeSpent"] ?></td>
It prints out 7800
I need 00:00:08
(H,M,S)
It's kept as an int
in the database, not datetime
I have tried:
<td><? echo gmdate("H:i:s", $row['timeSpent']); ?></td>
Except 7.8
seconds prints as 02:10:00