Is there a simple way to format a variable into an appropriate financial
string...
5.0
5.4
4.346
I'd like all of the above to format as $XXX.XX
_
Get your FREE download of MSN Explorer at http://explorer.msn.com
--
PHP
CTED]
Sent: Thursday, February 01, 2001 12:33 PM
Subject: [PHP] Formatting/Financial
Is there a simple way to format a variable into an appropriate financial
string...
5.0
5.4
4.346
I'd like all of the above to format as $XXX.XX
Hello, [!
Thursday, February 01, 2001, 06:33:53, you wrote:
r Is there a simple way to format a variable into an appropriate financial
r string...
r I'd like all of the above to format as $XXX.XX
try to use
$value = 5.0;
$sval = sprintf("$%003.2f",$value);
$sval will contain
3 matches
Mail list logo