title: Change selected option in select (form)
body: <p>I have an intial group of options like these:</p>
  
  <pre><code>&lt;select name="item[type]"&gt;
      &lt;option value="0" class="dr"&gt;First&lt;/option&gt;
      &lt;option value="1" class="dr"&gt;Second&lt;/option&gt;
      &lt;option value="2" class="dr"&gt;Third&lt;/option&gt;
      &lt;option value="3" class="dr"&gt;Fourth&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want to check if a variable <code>isset($test)</code> is defined. If it is, then I want to change the option selected where the <code>value</code> is equal of <code>$test</code>. Something like this <code>&lt;OPTION SELECTED&gt;</code></p>
  
  <p>For example. <code>$test = 3</code>; so, the option selected should be fourth. If <code>$test</code> is empty or not defined, then the first should be the option that is selected.</p>