Question Regarding Variable State in IF Statment
<p>I am a dead beginner with PHP and have been reading through 'PHP for the Web: Visual Quickstart Guide 4th Ed.' by Larry Ullman and have a question regarding something I came across in the book.</p>

<p>At the end of each chapter he has a few questions for review and I am stuck on one of them and not sure if I have the correct answer or the correct train of though regarding it.</p>

<p>The question is as follows:</p>

<blockquote>
  <p>Without knowing anything about $var will the following conditional be TRUE or FALSE? Why?</p>
</blockquote>

<pre><code>if ($var = 'donut') {...
</code></pre>

<p>I am apt to say that it will be false because we don't know if <code>$var</code> has been assigned the value donut yet within the program but I am not sure.</p>

<p>Can anyone help explain this to me so I can grasp this concept and feel confident about it?</p>

<p>Thank you,</p>

<p>Alex</p>
