Computation of dynamic numeric values in an if else statement - PHP
<p>How would I go about doing this logic in an if else statement?</p>

<pre><code>If numeric_field_value_1 is x
   Increase numeric_field_value_2 by ?%

If numeric_field_value_1 is y
   Decrease numeric_field_value_2 by ?%
</code></pre>

<p><em><strong>x</em></strong> is any number from 51 - 100.</p>

<p><em><strong>y</em></strong> is any number from 49 - 0.</p>

<p><em><strong>?%</em></strong> is the percentage that needs to be increased or decreased from numeric_field_value_2. For every number increase (for <em>x</em>) or decrease (for <em>y</em>) in value there is a 2% increase or decrease for every count/number. Example 53 equates to 6% increase and 45 equates to 10% decrease. Note that 50 is the base value for <em>x</em> and <em>y</em> and there is no increase or decrease when the value for <em>x</em> or <em>y</em> is 50.</p>

<p>*<strong>numeric_field_value_1*</strong> is a variable which value is pre-defined somewhere else.</p>

<p>*<strong>numeric_field_value_2*</strong> is another variable which value is pre-defined somewhere else.</p>

<p>Example:</p>

<p>numeric_field_value_1 = 60</p>

<p>numeric_field_value_2 = 175</p>

<p>Now 175 needs to be increased by 20%</p>

<hr>

<p>numeric_field_value_1 = 45</p>

<p>numeric_field_value_2 = 80</p>

<p>Now 80 needs to be decreased by 10%</p>
