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; *Sigh*, lets say I have: 2.65 3.3 5.2670 12.030 I would like it at least 2 ...


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
Zavaboy
 
Posts: n/a
Default Re: [PHP] Changing numbers

*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:

2.65
3.30
5.267
12.03

"James Rodenkirch" <jamesr@ez-net.com> wrote in message
news:3F1C298E.80602@ez-net.com...
> 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
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 07:07 AM.


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