I have a math problem that is simple.
$Variable1 - $Variable2 = $Variable3
The problem is, if Variable 2 is larger than Variable1 i get a Negitive number. i.e.
300 - 500 = -200
My question is, how do i turn that -200 into a positive 200?
THanks!😃
Well, it should be negative. I don't know how to change it to positive unless you change the variables.
Yah i know it should be negitive..but i need to display it as positive.
EXAMPLE: Total Rent Owed 2000 Total Rent Paid 2300 Total rent over paid -300
You see if you subtract totalrentOwed from totalrentpaid you get -300 i dont want -300 i want 300
so if there is no simple math to get this perhaps i can just use some trim function to trim off the "-" sign?
NM I figured it out... i just used the substr function to take out the "-" sign.
Using abs() would have been better...