Hi all,
I have been playing with this all day with no result, can you help please.
I have variavles
$row_couponsales['used_count']; // which holds a number.
$_SESSION['salesproductprice']; // which holds a price, example 2.40
$_SESSION['salescommision']; // which holds a number, example 10.8
$commission; // which will hold the result of
$commission = $_SESSION['salesproductprice'] * $_SESSION['salescommision'];
What I need to do is produce output that displays the result as 2.40 and not 2.0
<?php if ($row_couponsales['used_count'] > 0) {
$commission = $_SESSION['salesproductprice'] - $_SESSION['salescommision'];
echo number_format($commission, 2, '.', ',') * $row_couponsales['used_count'];
} else {
echo "0.00";
}
Dos this make sense.