hi all, my problem now is when i calculate the price +VAT
// this is my code
$totalvat = $total + ($total * 17.5 /100);
echo ($totalvat);
the output of this is like: 16.43825
i want it to be like: 16.43
does someone know how to do this?
echo (round($totalvat,2));
Follow the link for details http://www.php.net/manual/en/function.round.php
<?php $total = 13.99; $totalvat = $total + ($total * 17.5 /100); echo round($totalvat, 2); ?>
OOPS - Sorry hkucsis i was allready in post mode but halfway thru something else 🙂
thanks alot hkucsis that was all i needed