thefollower Posted December 7, 2007 Share Posted December 7, 2007 How do you make a set equation so that no matter what the % is or the value the answer will always work? So say you have $X = % $Y = value and your trying to subtract the $X % from $Y ? Link to comment https://forums.phpfreaks.com/topic/80646-solved-percentages/ Share on other sites More sharing options...
boushley Posted December 7, 2007 Share Posted December 7, 2007 So you want to subtract $x (which is a percent from ) $y. So if $x = 10 (assumed to be a percent) $y = 100 Then after the equation $y should equal 90? Is that what your going for? If this is the case... then $y = $y*($x/100) Or if you set $x=.10 then just $y = $y*$x Or are you looking for something that if you enter a percent or a non percent it still works? I'm kind of confused as to what you're looking for. Did that help? Is that what you're looking for??? ??? Link to comment https://forums.phpfreaks.com/topic/80646-solved-percentages/#findComment-408984 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.