
April 20th, 2000, 09:58 AM
|
|
Contributing User
|
|
Join Date: Mar 2000
Posts: 60
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
Howdy,
I've got a file that gets data from MySQL. When I print the field value, I get the full number, ex:
echo "$$balance";
returns "$12.00"
however, when I want to add two amounts that have empty decimal values
ex. ($balance=12.00; $add_fees=0.00)
$total = $balance + $add_fees;
echo "$$total";
then only "$12" is returned, missing the empty decimal value.
but I need to print the empty decimal as ".00"
this one has really stumped me. I appreciate any ideas.
Aaron
|