|
|
Posted by possibleas on 08/28/06 02:12
Hi, I have some prices stored in a table, and after retrieving records
like,
2.50
1.70
3.25
4.25
I add them together with something like,
<?php for ($x = 0; $x < sizeof($prices); $x++) {
$total=$total+$prices[$x]; }?>
But, when I print $total, if the amounts add up to an even number like
11.70, it prints out like 11.7
How do I get this to express any zeros at the end? Best regards, Amy
Navigation:
[Reply to this message]
|