How to use abs in PHP
This article describe about abs() Function in PHP.
abs() Function
This function return the absolute value of number.
Syntax
Parameter |
Description |
a |
Required. If number is type float return also float otherwise interger. |
Example
<html>
<body>
<?php
echo(abs(7.6) . "<br />");
echo(abs(-5) . "<br />");
echo(abs(5));
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here