title: Foreach Loop With TWO or MORE Conditions
body: <p>Here is my original which works (I'm using simple-html-dom)</p>
  
  <pre><code>foreach(($filtered-&gt;find('a'))  as $element) {
  // do stuff
  }
  </code></pre>
  
  <p>Problem is that now I may need to use 2 conditions... something like:</p>
  
  <pre><code>foreach(($filtered-&gt;find('a'))  as $element || ($filtered-&gt;find('img'))  as $element) {
  // do stuff
  }
  </code></pre>
  
  <p>But it doesn't work. Neither does:</p>
  
  <pre><code>foreach(($filtered-&gt;find('a') || $filtered-&gt;find('img'))  as $element) {
  // do stuff
  }
  </code></pre>
  
  <p>How does one go about implementing both conditions so it runs the "do stuff" whenever EITHER an 'a' element OR an 'img' element is found.</p>
  
  <p>Thank you very much for any help you can give. </p>