Re: [PHP] showing the decimal places

2005-03-17 Thread Jochem Maas
[EMAIL PROTECTED] wrote: when I define a number as $number = 2.00 then echo it the number shows as 2. How can I get the two zeros to show? This is not in any of my books but a fairly easy solution I'll bet! please consider php.net as your book too ;-) have fun with the following: $newLine = ($viaW

RE: [PHP] showing the decimal places

2005-03-17 Thread Jay Blanchard
[snip] when I define a number as $number = 2.00 then echo it the number shows as 2. How can I get the two zeros to show? This is not in any of my books but a fairly easy solution I'll bet! [/snip] http://www.php.net/number_format -- PHP General Mailing List (http://www.php.net/) To unsubscribe

RE: [PHP] showing the decimal places

2005-03-16 Thread Kim Madsen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 17, 2005 1:21 AM > when I define a number as > $number = 2.00 > then echo it the number shows as 2. How can I get the two zeros to show? Are You _sure_ the var is declared as a float? Have a look

RE: [PHP] showing the decimal places

2005-03-16 Thread Rob Agar
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > when I define a number as > > $number = 2.00 > > then echo it the number shows as 2. How can I get the two > zeros to show? > > This is not in any of my books but a fairly easy solution I'll bet! the function you want is called sprintf (s