The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
[php] Using the abs() function ?
Doing some calculations that may wary depending on the user, and
content calculated ofcourse.. But ewentually its bound to happen i will hit values below 0 and using integers as whole numbers no decimals one calc could be as simple as $result=$contentA-$ContentB But i feel like i dont have control over it, it might end up being 100 - 10 and will result in -90 So ive found the php manual and read about abs(); But got worried reading all the comments below http://php.net/manual/en/function.abs.php ----------------- What i want, is if the case is that $result ends up as a negative value i just want to turn it positive. so in the case above the -90 would be 90. was thinking doing something like this PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|