PHP time format conversion duration: read out: & nbsp; [time] & gt; & nbsp; string (3) & nbsp; 224 & lt ;? Php & nbsp; echo & nbsp; $ value [time] 60; & nbsp ;? & Gt; how to display the second on the page: 3.7333333333333 seconds & nbsp; how to convert it? PHP time format conversion
Duration:
Read: ["time"] => string (3) "224"
Seconds
How to display it on the page: 3.7333333333333 seconds
How to convert it?
Php string
Share: More
------ Solution --------------------
Look at the number_format () function.
------ Solution --------------------
Reference:
Duration:
Read: ["time"] => string (3) "224"
Seconds
How to display it on the page: 3.7333333333333 seconds
How to convert it?
I don't understand. What is your $ value ['Time'] unit? Millisecond? No.
If it is a second, divide it by 60. why?
What kind of format do you want to convert?
------ Solution --------------------
$ Value ['Time'] = 224;
Echo $ value ['Time']. "seconds
";
Echo ($ value ['Time']/60). "points
";
Echo round ($ value ['Time']/60, 2). "points
";
224 seconds
3.7333333333333 points
3.73 points
------ Solution --------------------
Echo gmdate ('H: I: S', 224); // 00:03:44