abs — Absolute value in php

by satheeshkumar 2012-07-23 17:42:28

abs — Absolute value in php,

syntax:number abs ( mixed $number );

number:
The numeric value to process.

Example:
$abs = abs(-4.2); // $abs = 4.2; (double/float)
$abs2 = abs(5); // $abs2 = 5; (integer)
$abs3 = abs(-5); // $abs3 = 5; (integer)
?>
2117
like
0
dislike
0
mail
flag

You must LOGIN to add comments