Extracting a specific row of a table by DOMDocument
问题 how can I extract information from a HTML file by using DOMDocument in PHP my HTML page has a source with this part inside this is my third table in the page that I need to work on: <table> <tbody> <tr> <td>A</td> <td>B</td> <td>C</td> <td>D</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> </tbody> </table> If my use ask me for showing row with B and D how should I extract the first row of this table and print it by using DOMDocument? 回答1: This would do it, it simply grabs