Thursday, June 20, 2013

php round to .5 or .25

To round to .5:
$value = round($value * 2, 0) / 2;

To round to .25
$value = round($value * 2, 0) / 4;

Take it easy -:)

No comments:

Post a Comment

Subscribe to RSS Feed Follow me on Twitter!