title: Php looping an array for hiding option in a `select`
body: <p>I having trouble with my array for my <strong><code>select</code></strong>. The <strong><code>option</code></strong> value is base from <strong><code>$a</code></strong>. What do i need to <strong>add in my code</strong> so that if <strong><code>$a</code></strong> has an equal value from <strong><code>$b</code></strong>, option will be <strong><code>hidden</code></strong>.</p>
  
  <p>My array</p>
  
  <pre><code>$a = array("1","2","3","4","5","6");
  $b = array("2","4","6");
  </code></pre>
  
  <p>Php</p>
  
  <pre><code>&lt;select&gt;
    &lt;?php foreach ($a as $i) {?&gt;
      &lt;option&gt; value="&lt;?php echo $i; ?&gt;" &gt;
        &lt;?php echo i?&gt;
      &lt;/option&gt;
    &lt;?php } ?&gt;
  &lt;/select&gt;
  </code></pre>