Re: converting whole or tenth prices to double decimal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found it....

$strprice1 = number_format($strprice1, 2, '.', '');
----- Original Message ----- 
From: "Brian A. Anderson" <listread@xxxxxxxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, December 23, 2004 6:25 AM
Subject:  converting whole or tenth prices to double decimal


> Anybody know the easiest way to convert a number like 2.1 to $2.10 or 2 to
> $2.00?
>
> Silly question?
>
> -Brian
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux