How can the PHP function floor be used to round down a floating-point number?
The PHP function floor can be used to round down a floating-point number to the nearest integer that is less than or equal to the original number. To use the floor function, simply pass the floating-point number as an argument to the function. The function will return the rounded down integer value.
$floatNumber = 7.8;
$roundedDownNumber = floor($floatNumber);
echo $roundedDownNumber; // Output: 7