I’ve done this before but can’t find my code snippet.
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.
$tags = $doc->getElementsByTagName('span');
This is a single row of the html I am trying to parse
<span class='close'><a href="bla.com/test.htm">test row</a></span>
First attempt (untested):