Posted by Rik on 05/14/06 16:14
WJ Zeeuwen wrote:
> Hi all,
>
> Is it possible to adjust the number of digits in a float?
>
> For example $test = 1/3; echo ($test); gives 0.33333333.. But i only
> want 0.33
> Is there a function or do i have to use round($test*100)/100
I'd use round($test,2);
Also possible is number_format();
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|