"Abs () PHP Function"

2007-11-02 21:49 来源: 本站 作者:phpma 网友评论 0 条 浏览次数 1
Definition: The absolute value of a number is the distance between the number and 0, and is always a positive number. In math it is usually depicted as two vertical lines like this: |X| (the absolute value of X.) In PHP we use the Abs () function to get this value.
Also Known As: Absolute Value Functionphpma.com
Examples:
<?php
abs (-6) ;
//returns a value of 6

abs (12.4) ;
//returns a value of 12.4

abs (-456.2) ;
// returns a value of 456.2
?> phpma.com
上一篇:"Array () PHP Fu..    下一篇:PHP MySQL Tutori..

相关主题:

网友评论