September 2001
Intermediate to advanced
768 pages
32h 45m
English
int floor(float i) Truncates the given argument to the integer portion.
Returns:
Next-lowest integer from the given argument; FALSE on error
Description:
floor() is the opposite of ceil(). It rounds down a floating-point number to the next-lowest integer, no matter what the value of the floating-point number is.
Version:
PHP 3, PHP 4
See also:
ceil() round()
Example:
$number = 12.923; echo "The next smaller integer to $number is ", floor($number); |
Read now
Unlock full access