PHP Floor() Function

PHP Floor For Numbers

The floor() function with php allows you to round a number down to the nearest whole number. You must take into consideration that any decimal points will be removed.

Floor Example

$numb = floor(23.5); 
echo $number; // output is 23  
echo floor(34.67); // output is 34.  
echo "My answer to the math question is ".floor(99.9); // Output is My answer to the math question is 99.