> From: Brad Pauly [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 2:45 PM
> To: Roger B.A Klorese
> Cc: 'justin gruenberg'; 'Curt Zirzow'; 'PHP-General'
> Subject: Re: [PHP] Changing numbers
>
>
> I am not sure what he is aft
Roger B.A Klorese wrote:
* Thus wrote zavaboy ([EMAIL PROTECTED]):
I have the following numbers:
12.400
666.75
23
369.2
3.234
How can I make them have at least 2 decimal places?
So, they will output:
12.40
666.75
23.00
269.20
3.234
What's so hard about this?
He wants two or more *significant*
> From: justin gruenberg [mailto:[EMAIL PROTECTED]
> Subject: Re: [PHP] Changing numbers
>
>
> Curt Zirzow wrote:
>
> >* Thus wrote zavaboy ([EMAIL PROTECTED]):
> >
> >
> >>I have the following numbers:
> >>
> >>12.400
> >
Curt Zirzow wrote:
* Thus wrote zavaboy ([EMAIL PROTECTED]):
I have the following numbers:
12.400
666.75
23
369.2
3.234
How can I make them have at least 2 decimal places?
So, they will output:
12.40
666.75
23.00
269.20
3.234
Thanks in advance!
What I dont understand is that your examples are
* Thus wrote zavaboy ([EMAIL PROTECTED]):
> I have the following numbers:
>
> 12.400
> 666.75
> 23
> 369.2
> 3.234
>
> How can I make them have at least 2 decimal places?
> So, they will output:
>
> 12.40
> 666.75
> 23.00
> 269.20
> 3.234
>
> Thanks in advance!
http://php.net/number_format
or
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 pla
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
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:
2.65
3.30
5.267
12.03
"James Rodenkirch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
try rounding it first
http://www.php.net/manual/en/fu
[snip]
I would like it at least 2 decimal places.. So, 5.2670 would be 5.267
not
5.27:
[/snip]
RTFM for formatted string http://us3.php.net/sprintf or
http://us3.php.net/printf
HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
*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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> try rounding it first
>
> http://www.php.net/manual/en/function.
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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I make them have at least 2 decimal places?
[/snip]
RTFM at
What about if I had 2.856 that function will make it 2.86.
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I make them have at least 2 decimal places?
[/snip]
RTFM at http://www.php.net/number_format
HTH!
--
PHP General Mailing List (http://www.php
[snip]
How can I make them have at least 2 decimal places?
[/snip]
RTFM at http://www.php.net/number_format
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have the following numbers:
12.400
666.75
23
369.2
3.234
How can I make them have at least 2 decimal places?
So, they will output:
12.40
666.75
23.00
269.20
3.234
Thanks in advance!
--
- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com
--
PHP General Mailing List (http://www.php.net/)
To unsu
14 matches
Mail list logo