PHP Math Function : abs()

The abs() function is used to get the absolute or positive value of given number. The syntax is as follows :
 abs( number );
Example :
<?php

  echo abs(-7.8) . "<br/>";
  echo abs(-200) . "<br/>";
  echo abs(3.80) . "<br/>";

?>
Output :

7.8
200
3.8

Next Topic :