title: how to skip foreach loop when value match in codeigniter
body: <p>Actually i have three foreach loop.I want to skip the second foreach loop when third foreach loop value($val == $test) match.
  This is my code.</p>
  
  <pre><code>  &lt;tbody&gt;
     &lt;?php foreach ($tests as $test): ?&gt;
      &lt;tr&gt;
       &lt;td&gt;&lt;?= $test; ?&gt;&lt;/td&gt;
       &lt;?php foreach ($room as $key =&gt; $value): ?&gt;
        &lt;?php foreach ($value['dates'] as $val) : ?&gt;
         &lt;?php if ($val == $test) { ?&gt;
          &lt;td&gt;&lt;span class="text-danger"&gt;&lt;?= $value['room_id'];?&lt;/span&gt;&lt;/td&gt;
         &lt;?php } ?&gt;
        &lt;?php endforeach; ?&gt;
       &lt;td&gt;&lt;span class="text-custom"&gt;&lt;?= $value['room_id']; ?&gt;&lt;/span&gt;&lt;/td&gt;
      &lt;?php endforeach; ?&gt;
     &lt;/tr&gt;
   &lt;?php endforeach; ?&gt;
  &lt;/tbody&gt; 
  </code></pre>