The online racing simulator
Milliseconds 2 String
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.
$mins = floor($time / 60000);
$secs = ($time % 60000) / 1000;
Indeed, you might of become my favorite person.


<?php 
function convert_ms2string($time) {
    return 
sprintf('%d:%2.2f'floor($time 60000), (($time 60000) / 1000));
}
?>

One line functions are the best! So what's your real name AndroidXP? I'd like to put you into the credits for LFSWorldSDK.

FGED GREDG RDFGDR GSFDG