Re: how do I convert a # to time?
Roger Raymond <roger-vp4IRbjYgwNWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.cms.xaraya.curiosa |
|---|---|
| Organization | Xaraya News Server |
| Message-ID | <[email protected]> |
mulpinBR - 111.898.068 > http://br.xaraya.com wrote:
> function ReadTime($readtxt) {
> $readspeed = CountWords($readtxt);
> $readtimeraw = $readspeed / 150;
> list($min,$secs) = explode('.',$readtimeraw);
> $secs = "0.$secs";
> $secs = floor(60*($secs/10));
> $readtime = "$min'$secs\"";
> return($readtime);
Dunno if it's faster, but it's smaller :)
function ReadTime($readtxt)
{
list($min,$sec) = explode('.',(CountWords($readtxt)/150));
$secs = floor(60*("0.$secs"));
return "$min'$secs\"";
}