Using PHP, MySQLi.
I am selecting a string from a MySQL database and saving it to a variable called $queryTime
, I'd like to modify how this string is displayed on screen. When I print_r($queryTime);
I see;
01:25:24
When I var_dump($queryTime)
I see;
string(8) "01:25:24"
Is there any way I can display the string in a time duration format - something like;
1 hour, 25 minutes, 24 seconds
Presumably because the database field is stored as a varchar
and not a time-stamp
things are more complicated? Unfortunately I don't have access to modify the database.
Any help is appreciated.