Scraping HTML from a Table



<table class="info"> <thead> <tr> <th>Mailing Address</th> <th>Location Address</th> </tr> </thead> <tbody> <tr> <td><address>123 Somewhere ST.<br/>Somewhere, CA 123456</address></td> <td><address>123 Anotherplace Ln.<br/>Somewhere Else, CA 123434</address><br/></td> </tr> </tbody> </table> </div> <h3>Information</h3> <div class="blockContent borderedContent"> <table class="entryForm"> <tbody> <tr> <th>Website:</th> <td></td>
         <th>Segment 1:</th>
         <td>SomeInfo Here</td>
         <td><a class="mailLink" href=""></a></td>

I need help on reading this table.
I would like it if I could have 7 variables


Can someone show me how to read this type of table and create those variables? I have been working on this for 2 days and can't figure this out. So I figured I would see what someone else could help me with.




If your file is valid XML then you could use DOMDocument and DOMXPath to read your values.

This article has been dead for over six months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: