Calling the Built-in abs() Function : abs « Math « PHP






Calling the Built-in abs() Function

 
<html>
<head><title>Calling the Built-in abs() function</title></head>
<body>
<div>
<?php
    $num = -321;
    $newnum = abs( $num );
    print $newnum;
?>
</div>
</body>
</html>
  
  








Related examples in the same category

1.abs( ) function returns the absolute value of the parameter
2.You can either send a floating-point number or an integer to abs( )