PHP Break successive If Statements
<p>I have a large set of if statements that when one of them is true then the following if statements don't need to be tested.</p>

<p>I don't know what the best way to do this is.</p>

<p>Should I create a function, switch or while loop?</p>

<p>Each successive if statement is different and has the input values created beforehand. I shall try and create a simple example to try and explain this better.</p>

<pre><code>$total = ($val1+$val2+$val3)/$arbitaryvalue
if($total &gt; 2){//Do Something
}

$total = ($val1+$val2)/$anothervalue
if($total &gt; 2){//Do Something different
}
</code></pre>
