Negative number
Posted: Sun Nov 14, 2004 4:04 am
Dont know if im just not seeing it, but is there a function to turn a possitive number into a negative? E.g. 12 will become -12 or do we just have to subtract the value from itself twice?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$value *= -1;
not
$value -= ($value*2);Sometimes the obvious is the unobvious.. if that makes sensekettle_drum wrote:Hmm interesting...lol. That might be a better idea
Code: Select all
$value *= -1; not $value -= ($value*2);
Like known knowns and known unkonwns and unknown knowns and unknown unknowns.Phenom wrote:Sometimes the obvious is the unobvious.. if that makes sense