HI Is there a function to convert a negative number to positive? I was going to do something like: $negnum=($negnum*2); to achieve this but I suspect there is another way.
Nick
Easy:
$positive = 0 - $negative;
Two wrongs make a right. I mean.. Two negatives make a positive.
what's the zero in aid of? :-)
$pos = -$neg;
Note, if $neg is positive, $pos will be negative. Instead, use:
$pos = abs($neg);
Thanks guys, at age 30 (almost) I guess it's too late regretting a seriously misspent youth, and subsequently innadequate education!
Cheers