Don't round it if you want the decimal.
PHP Code:
$amount = 1;
$exchange = 1.5;
$total = ($amount*$exchange);
echo $total;
that will echo 1.5. If you want a trailing zero:
PHP Code:
$amount = 1;
$exchange = 1.5;
$total = ($amount*$exchange);
if ((strlen($total) ==1) && $total != 0) { $total = $total.".00"; }
/* adds decimal and two following zeros if total does not = ? if you want 0.00 remove the "&& $total !-0" portion of the if statement. */
if (strlen($total) ==3) { $total = $total."0"; }
/* adds traling zero for x.x amount. */
echo $total;
You don' need a statement for strlen = 2 because that would be X. and there will never be a decimal with only 1 digit and if it's a two digit whole number you do not want to add a zero. I don't know how long your rounding will be. if it's 4 digits behind the decimal you may need a couple more statements to compensate.
This only effects display of $total it doesn't alter the database.
This is how I do it on my site.