ghgarcia Posted August 28, 2006 Share Posted August 28, 2006 I need some help in changing a positive to a negative and vica as versa. Any help would be greatly appreciated.Thanks,George Link to comment https://forums.phpfreaks.com/topic/18953-change-sign-on-numeric-value/ Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 Multiply by -1.[code]$x = 10;echo 'x = ' . $x . "<br>-x = ' . $x * -1;$y = -20;echo 'y = ' . $y . "<br>-y = ' . $y * -1;[/code] Link to comment https://forums.phpfreaks.com/topic/18953-change-sign-on-numeric-value/#findComment-81895 Share on other sites More sharing options...
ghgarcia Posted August 28, 2006 Author Share Posted August 28, 2006 Thanks really appreciate it works great.George Link to comment https://forums.phpfreaks.com/topic/18953-change-sign-on-numeric-value/#findComment-81899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.