On Wednesday 08 May 2002 5:18 pm, Richard Kettlewell wrote:
> Steve Fosdick <fozzy(a)pelvoux.demon.co.uk> writes:
> > On Tue, 07 May 2002 11:01:54 xs(a)kittenz.org wrote:
> >> on Tue, May 07, 2002 at 10:30:22AM +0500, Simon wrote:
> >>> It's gotta be easy, but I can't find it... How do I reduce
> >>> the number of decimal places in a variable ???
<snip>
>
> $a = int(100 * $a)/100.0;
>
> > Which will work, but personally I would try to avoid reducing the
> > number of decimal places that are stored in the variable and instead
> > do the reduction when the variable was printed, i.e. use sprintf and
> > printf for printing the values.
>
> Indeed.
</snip>
Perfect... thanks