Jump to content

[SOLVED] percentages...


thefollower

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.