almightyegg Posted April 20, 2008 Share Posted April 20, 2008 Is there any way to make sure a number is positive? so if my variable is -1024 it would turn it into 1024 Any help is greatly appreciated Link to comment https://forums.phpfreaks.com/topic/102001-solved-making-sure-variables-are-positive/ Share on other sites More sharing options...
tippy_102 Posted April 20, 2008 Share Posted April 20, 2008 Use abs: http://ca3.php.net/abs Link to comment https://forums.phpfreaks.com/topic/102001-solved-making-sure-variables-are-positive/#findComment-522013 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.