Wednesday 23 September 2015

Rounding to the nearest nickel in php

<?php
$Price = 98.06;
$Price = round(20 * $Price,0)/20;
print $Price;
?>
//: Output
98.05

No comments:

Post a Comment