Re: FN-FORUM: PHP Float
date posted 5th August 2003 17:54
This *might* be of some use
echo round(3.4); // 3
echo round(3.5); // 4
echo round(3.6); // 4
echo round(3.6, 0); // 4
echo round(1.95583, 2); // 1.96
echo round(1241757, -3); // 1242000
ttfn
Dan.
> Hi All,
> Last questions for the day. I've got a string that say could be 123.4 or
> 123.323. How would I get it to 123.00. I've got the number in a variable
> which I then went to put into another varible (this case a session
> handeler)
>
> so I've got
> $no="123.321";
>
> I've tried B
> $foo= (int) ($no);
>
> but didn't work. Can someone give me a push please
>
> Rgds
>
> Rus