title: PHP dom - How to get the contents within a span tag that includes a hyperlink
body: <p>I've done this before but can't find my code snippet.</p>
  
  <p>I'd like to parse an html file and pull everything into my browser that sits between some span tags. There are other span tags in the html that I do not want so I figured I would limit the parsing to just the span tags that have the same css class. Can someone please give me an example of how to do this? Thanks.</p>
  
  <pre><code>$tags = $doc-&gt;getElementsByTagName('span');
  </code></pre>
  
  <hr>
  
  <p>This is a single row of the html I am trying to parse</p>
  
  <pre><code>&lt;span class='close'&gt;&lt;a href="bla.com/test.htm"&gt;test row&lt;/a&gt;&lt;/span&gt;
  </code></pre>