This is a discussion on Re: [PHP] Changing numbers within the PHP General forums, part of the PHP Programming Forums category; try rounding it first http://www.php.net/manual/en/function.round.php Zavaboy wrote: > What about if I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
try rounding it first
http://www.php.net/manual/en/function.round.php Zavaboy wrote: > What about if I had 2.856 that function will make it 2.86. > > > "Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message > news:C8F323573C030A448F3E5A2B6FE2070B0101F95A@neme sis... > [snip] > How can I make them have at least 2 decimal places? > [/snip] > > RTFM at http://www.php.net/number_format > > HTH! > > |
|
|||
|
bob parker wrote:
> On Tue, 22 Jul 2003 04:03, zavaboy wrote: > >>*Sigh*, lets say I have: >> >>2.65 >>3.3 >>5.2670 >>12.030 >> >>I would like it at least 2 decimal places.. So, 5.2670 would be 5.267 not >>5.27: >> > > > 5.267 is 3 decimal places - count them > He said "at least 2 decimal places", not "exactally two decimal places". |