Re: [PHP] converting string to monetary format

2004-04-13 Thread Chris Boget
> it is number_format http://www.php.net/number_format You can also use either of the following: http://us2.php.net/manual/en/function.sprintf.php http://us2.php.net/manual/en/function.printf.php echo sprintf( '%.02f', 59.9 ); Chris -- PHP General Mailing List (http://www.php.net/) To uns

RE: [PHP] converting string to monetary format

2004-04-13 Thread Jay Blanchard
[snip] Simple problem... I want to manipulate with PHP function to get "desired output" below. $var="59.9" Desired Output: $var="59.90" I thought number_format would do the trick but no way, unless I just missed something.. ? [/snip] it is number_format http://www.php.net/number_format $var

[PHP] converting string to monetary format

2004-04-13 Thread Kristopher Spencer-Yates
Simple problem... I want to manipulate with PHP function to get "desired output" below. $var="59.9" Desired Output: $var="59.90" I thought number_format would do the trick but no way, unless I just missed something.. ? Any quick way to do this using a built in PHP function? I could do it t