Re: New to list
| From: | Alan McFarlane | Date: | Fri, 11 Jan 2002 00:23:15 +0000 |
| Subject: | Re: New to list | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80132@lists.php.net to get a copy of this message | ||
try:
$result = ((0.416/$time)*60)*60);
echo number_format($result, 2);
or
echo sprintf("%.2f", $result);
Andrew <andrew@therapids.net> wrote in message
news:MBBBJGCMHODFFEIKFFHBAEPACAAA.andrew@therapids.net...
> Hello to you all!
> I am new to this list and I have a question that maybe someone can help
with
>
> In a script I am working on I have a math's equation :
>
> ((0.416 / $time) * 60) * 60)
>
> this out but a figure at goes to a about 10 decimal places I only want 2
> decimal places and just can not figure out how to do this
>
> Any ideas would be great
>
>
> Thanks
>
> Andrew
> Web Harper Graphics
> www.webharpergraphics.com
>
>
>
>