title: Find all occurences of an HTML tag in PHP
body: <p>How would I be able to find all occurrences of an html tag? For example, if my string was...</p>
  
  <pre><code>&lt;h1&gt;Images&lt;/h1&gt;
  &lt;img src="img/bird.jpg"&gt;
  &lt;p&gt;Hello world&lt;/p&gt;
  &lt;img src="img/beach.jpg" alt="test" class="picture"&gt;
  </code></pre>
  
  <p>And If I wanted to make a list of all IMG tags, it would come out like this:</p>
  
  <pre><code>&lt;img src="img/bird.jpg"&gt;
  &lt;img src="img/beach.jpg" alt="test" class="picture"&gt;
  </code></pre>
  
  <p>How would you guys do this?</p>