Skip to content

Instantly share code, notes, and snippets.

@johnbhartley
Created July 3, 2014 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbhartley/ccf11c98d041bc499185 to your computer and use it in GitHub Desktop.
Save johnbhartley/ccf11c98d041bc499185 to your computer and use it in GitHub Desktop.
Round down to nearest hundred
$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