title: PHP explode - running loop through each array item
body: <p>Here's the issue:</p>
  
  <p>I retrieve the following data string from my database:</p>
  
  <pre><code>$row-&gt;exceptions = '1,2,3';
  </code></pre>
  
  <p>After <code>explode</code> I need the below code to check each one of the exploded pieces</p>
  
  <pre><code>$exceptions = explode(",", $row-&gt;exceptions);
  
  //result is 
  //[0] =&gt; 1
  //[1] =&gt; 2
  //[2] =&gt; 3
  
  for ($i = 0; $i &lt;= $row-&gt;frequency; $i++) {
  
      if ($exceptions[] == $i) {
  
          continue;
  
      } else {
  
          //do something else
      }
  }
  </code></pre>
  
  <p>How can I make <code>$exceptions[]</code> loop through all keys from the exploded array so it evaluates if <code>==$i</code>?</p>
  
  <p>Thanks for helping.</p>