Hello,
i need help with the round function.
My code:
$price = mysql_result($result,0,"price");
$price2 = $price;
$price = $price/100*10; //-10%
$price = $price2-$price;
$price = round($price, 2);
i need to round a price. say i take 10% off $price(which may be 1.65), it equals 1.485. To keep this in price format, i use round($price, 2). but if the price loaded is 3.00, this equals 2.7, how do i keep this with a zero in the correct place, (bearing in mind i have to keep the figure in 0.00 format no matter what the original price is)?
Thanks alot!
Please Help!