PHP Tips & Tutorials

PHP: Absolute Value Function abs()

A number’s absolute value is the distance from the origin of the axis to itself. In PHP, you can get the absolute value of any numeric value by the help of abs() function:

$a = abs(-19.7); // $a = 19.7

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Shoot me a message.