Jump to content

Recommended Posts

I need a math equation that will always work out 10% of a number that is ALWAYS increasing. I tried:

 

$number = 12;
echo (($number / 100) * 10);

 

But i have 2 equation's. One for supporters & one for non supporters. The supporters should get 10% while the non supporters should get 5% of $number which increases from time to time.

 

The ((12 / 100) * 10) works out to 1.2 then the ((12 / 100) * 5) work's out to 0.6, which both results into 8% as with my mysql query, it's updating. with 1 for both of them.

 

Is there anyway to either work out 10% or 5% out of 12 and increasing numbers?

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.