Re: [PHP] Changing numbers

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-21-2003
James Rodenkirch
 
Posts: n/a
Default Re: [PHP] Changing numbers

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!
>
>


Reply With Quote
  #2 (permalink)  
Old 07-21-2003
Bob Parker
 
Posts: n/a
Default Re: [PHP] Changing numbers

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
Reply With Quote
  #3 (permalink)  
Old 07-21-2003
John Nichel
 
Posts: n/a
Default Re: [PHP] Changing numbers

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".

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0