How do I round down a number?
One method is to think of ceil(ing) and what's the opposite of ceiling? That's right, floor!
<?php
$mynumber = 12.7;
$lower = floor($mynumber);
echo "Number is now $lower";//number is now 12
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More numbers PHP Questions
How do I force a value to be treated as a number?How do I work out the remainder of a division?
How do I round up a number?
How do I generate a random number?
How do I format a number with commas like a monetary value?
