用php获取html内容

I'm trying to fetch data from html document.

<table style="border:0px none;margin:0px;padding:0px"><tr><td valign="middle"><p style="background-color:#EE0000;color:#fff;margin-right:5px;padding: 2px 3px;"><b>7767</b></p></td><td valign="middle"><h2 style="padding:1px">title 2</h2></td></tr></table>

there are undeterminated number of tables in the page like this one , every time when there are a table I want to get the number after the style, here 7767 , and the sentence in the second , here title 2. I found some examples I tried to adjust them but it still don't work

$html = file_get_html('http://website.com/');


foreach($html->find('table') as $article) {
    $item['nummer']     = $article->find('td.b', 0)->plaintext;
    $item['title']    = $article->find('td.h2', 0)->plaintext;
    $articles[] = $item;
}

. is for specifying classes. If you want to specify that one element is inside another, separate them with a space:

$item['nummer']     = $article->find('td b', 0)->plaintext;
$item['title']    = $article->find('td h2', 0)->plaintext;

The syntax for the argument to find is mostly the same as CSS selectors.