こんにちは私はウェブサイトからいくつかの情報を引き出してテーブルに入れ、それをphpで印刷しようとしています
DOMパーサーを使用しているのは、まさに必要なもののように見えるからです。
<?php
include 'simple_html_dom.php';
$html = file_get_html('http://evolve.sg-community.de/index.php?page=plugins');
$table = $html->find('#theTable');
$theData = array();
foreach($table->find('tr') as $row) {
$rowData = array();
foreach($row->find('td.text') as $cell) {
$rowData[] = $cell->innertext;
}
$theData[] = $rowData;
}
print_r($theData);
?>
私は取得し続けます
Fatal error: Call to a member function find() on a non-object
で
foreach($table->find('tr') as $row) {