Simple HTML Dom を使用してページ上のテーブルから配列を返すと、テーブルは次のようになります
<table width="414" cellspacing="4" cellpadding="0" border="0">
<tbody>
<tr>
<td width="170">Total :</td>
<td>58,262</td>
</tr>
... // there are about another 10 <tr> tags, and table closing tags after that.
しかし、コマンドを実行すると、 print_r($es = $html->find('table[width=414]'));
(その解析とは対照的に) 巨大な配列が返されます。以下の例では、最初の 'Total :' 行まで移動し、次は約 200 行下にあります。より「サニタイズされた」結果を取り戻す方法はありますか?
Array ( [0] => simple_html_dom_node Object ( [nodetype] => 1 [tag] => table [attr] => Array ( [cellpadding] => 0 [cellspacing] => 4 [border] => 0 [width] => 414 ) [children] => Array ( [0] => simple_html_dom_node Object ( [nodetype] => 1 [tag] => tr [attr] => Array ( ) [children] => Array ( [0] => simple_html_dom_node Object ( [nodetype] => 1 [tag] => td [attr] => Array ( [width] => 170 ) [children] => Array ( ) [nodes] => Array ( [0] => simple_html_dom_node Object ( [nodetype] => 3 [tag] => text [attr] => Array ( ) [children] => Array ( ) [nodes] => Array ( ) [parent] => simple_html_dom_node Object *RECURSION* [_] => Array ( [4] => Total : )