title: if variable = 1 then checkbox = checked
body: <p>I want to say if </p>
  
  <pre><code>$supervisor = 1 
  </code></pre>
  
  <p>then </p>
  
  <pre><code>checkbox=checked else checkbox=unchecked
  </code></pre>
  
  <p>I have used:</p>
  
  <pre><code>&lt;input name="supervisor" type="checkbox" &lt;?php if ($supervisor = 1){?&gt; checked="checked" &lt;?php } else { ?&gt; checked="unchecked" &lt;?php } ?&gt;/&gt;
  </code></pre>
  
  <p>and <code>echo $supervisor;</code> returns 0</p>
  
  <p>however the box is ticked?</p>
  
  <p>Any Help would be hugely appreciated!</p>