 <p>On the basis that the <code>else</code> is there, no, it won't work.</p> <p>For it to work how you wish it to, you'd need to remove the else and just use 2 <code>if</code> statements, such as;</p> <pre><code>// Set default values; $a = 2; $b = 0; // Check $a if( $a == 2 ) { // Change values $a = 0; $ b = 2; } // Check $b, which is now 2 due to the condition matching above if( $b == 2 ) { echo "Cool?"; } </code></pre> <p>I believe you're slightly missing the point with the else.</p> <p>It is used for condition matching, to confirm multiple possibilies.</p> <p>For example, let's imagine a lottery, where the prize money is split into ranges;</p> <p>Numbers 01 - 10 = $5. Numbers 11 - 20 = $10. Numbers 21 - 30 = $20.</p> <p>You're code could look something like</p> <pre><code>&lt;?php $random_result = mt_rand(0, 30); if ($random_number &gt; 20) { $amount = 20; } else if ($random_number &gt; 10) { $amount = 10; } else { $amount = 5; } echo 'The jackpot for today was $' . $amount . '!'; </code></pre>