[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
[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
-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
> 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
4 matches
Mail list logo