Split 1 Split 2 Split 3
23100 51710 71480
0:23.10 0:51.71 1:11.48
------------------------
<?php
php
function convertMS2String($time) {
$secs = $time / 1000;
while ($secs > 60) {
$mins++;
$secs -= 60;
}
return sprintf('%d:%2.2f', $mins, $secs);
}
Test 1:
23100 51710 71480
echo convertMS2String(23100); echo convertMS2String(51710); echo convertMS2String(71480);
?>
Works, but I still fell dirty about it. Seems like there should be a better way.