April 16th, 2000, 10:15 PM
a simple question, i hope, but i can't find
i pull out of a table a price which is for
instance $125.00 then i want to multiple
it by 2
$total = ($price*2);
and the output is 250
how can i convert this to 250.00 ????
thanks for helping me out !!
Jan the Netherlands.
April 16th, 2000, 11:07 PM
Try print number_format($total, 2,".",""); // Number, Decimals, Decimal separator, Thousands separator
or printf( "%.2f", $total );
[This message has been edited by the Blind Bastard :]
[This message has been edited by Dist (edited April 18, 2000).]
April 18th, 2000, 10:00 PM
THANKS Dist !!
the printf("%.2f",$total );
works great :-))