Forum Moderators: coopster
I would like an equation like this
$money = rand(5,8) * 5;
then I would like to make that number, for example "25" to become a percent and subtract that amount from another number, so my question is how do I subtract 25% from say 100.
25/100 = .25 = 25%
Now the question is, do you want to subtract 25% of a number from the same number?
Something like 100 - 25% of 100? Which would be 100 - 25.
You could do that with something like :
$new_number = $orig_number - ($orig_number * $percentage);
Of course .. I could just be missing what you want to do by a loooong ways :)
-sned