Q:

Reading Html from another website and analyze html tree

I hope this is not duplicate.
I read another website via php like this:
$homepage = @file_get_contents($url);

if ( $homepage == false ) {
  //...oh dear
}   

Now I want to get html tag node (jquery anchor) from html say I have this code
<div>
  <table>
    <tr>
      <td>
        xxx
      </td>
      <td>
        yyy
      </td>
      <td>
        zzz
      </td>
    <tr>
  </table>
</div>

I want to get array with "xxx", "yyy", "zzz".
Normaly I would use jquery/js and loop throu $('div table tr td').Val(); but how can I do it with php?

A:

You can use PHP Html Parser
Example code : 
require "vendor/autoload.php";
use PHPHtmlParser\Dom;

$dom = new Dom;
$dom->load('<div class="all"><p>Hey bro, <a href="google.com">click here</a><br /> :)</p></div>');
$a = $dom->find('a')[0];
echo $a->text; // "click here"

