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