September 2001
Intermediate to advanced
768 pages
32h 45m
English
mixed abs(mixed number) Returns the absolute value of an integer or double.
Returns:
Absolute value of an integer
Description:
The abs() function returns the absolute value of the passed variable. The absolute value of a number is the value without regard to positive or negative notation. This can be an integer or a floating-point number; abs() returns the same type that was passed to it.
Version:
PHP 3, PHP 4
Example:
$int = -123.450; echo "The absolute value of $int is ", abs($int); |
Read now
Unlock full access