I am trying to round the equation below to the nearest 10 cents with two decimal points showing (i.e. 15.20 not 15.2)
I am using:
echo round((($content[‘prodPrice’]/71.22)+.025),2).’ Per Week
’
Any ideas?
I am trying to round the equation below to the nearest 10 cents with two decimal points showing (i.e. 15.20 not 15.2)
I am using:
echo round((($content[‘prodPrice’]/71.22)+.025),2).’ Per Week
’
Any ideas?
echo number_format(round((($content[‘prodPrice’]/71.22)+.025),2),2,’.’,’,’).’ Per Week
’
Try that its made the whole thing HUGE! A function may be a good idea here.
Thanks, that seems to work, but does not seem to round up to the nearest 10 cents. Any ideas on a function that might be able to achieve this?
try:
[php]function money_round($price){
$price = (($price/71.22)+.025);
$price=number_format(round($price*10)/10,2);
return $price;
}[/php]