SyntaxFix
Write A Post
Hire A Developer
Questions
How about something trivial like:
inverting:
$num = -$num;
converting only positive into negative:
if ($num > 0) $num = -$num;
converting only negative into positive:
if ($num < 0) $num = -$num;