Created
July 3, 2014 16:15
-
-
Save johnbhartley/ccf11c98d041bc499185 to your computer and use it in GitHub Desktop.
Round down to nearest hundred
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$min = 780; | |
$floor = 780/100; // 7.8 | |
$floor_fix = floor($floor); // 7.0 | |
$min = $floor_fix*100; // 700 | |
echo $min; // will output 700 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment