Home
PHP
Chart
Class
Components
Cookie Session
Data Structure
Data Type
Date
Design Patterns
Development
DNS
Email
File Directory
Form
Functions
Graphics Image
HTML
Language Basics
Login Authentication
Math
MySQL Database
Network
Operator
PDF
Reflection
Statement
String
Utility Function
Web Services SOAP WSDL
XML
Menu
abs( ) function returns the absolute value of the parameter : abs « Math « PHP
PHP
Math
abs
abs( ) function returns the absolute value of the parameter
<? abs(50);
// 50
abs(-12);
// 12
?>
Related examples in the same category
1.
Calling the Built-in abs() Function
2.
You can either send a floating-point number or an integer to abs( )