am trying to total a varible.
this is what i have so far
<?php echo sprintf("%01.2f", $row_Recordset1['itemrrp']*1.175); ?>
with this its rounding off the 2 deminals to the nearest ten but i just want it rounded to 2 decimals,
any ideas anyone?
RTFM
http://www.phpbuilder.com/manual/function.round.php
thanks for the reply
what i have now is just round of the whole number now, no decimals.
echo round($row_Recordset1['itemrrp']*1.175);
You gotta read futher..
echo round($row_Recordset1['itemrrp']*1.175, 2);
Mark.
i still can't get it too work with the round function, still rounds it up to the nearest ten
Originally posted by tazgalsinh i still can't get it too work with the round function, still rounds it up to the nearest ten
Please clarify what you mean. Say the RRP is 58.95. What do you want it to display if it's not "69.27"?