我正在尝试从
[1]解析到达表并将其放入一个数组中以便能够格式化它并将其放入表中.
我在这里和那里做了一些研究,我从其他问题得到了一些代码,但是我不能像我想的那样使数组和表格看起来像.
有人可以帮帮我吗?
require('simple_html_dom.php');
$html = file_get_html('http://flightplan.romatsa.ro/init/fpl/flightslr/LRCL/');
$table = $html->find('table', 3);
foreach($table->find('tr') as $row) {
// initialize array to store the cell data from each row
$rowData = array();
foreach($row->find('td') as $cell) {
// push the cell's text to the array
$rowData[] = $cell->innertext;
}
echo "
echo "
";echo $rowData[0]. " ";
echo "
";echo "
";echo $rowData[1]. " ";
echo "
";echo "
";echo $rowData[2]. " ";
echo "
";echo "
";echo $rowData[3]. " ";
echo "
";echo "
";echo $rowData[4]. " ";
echo "
";echo "
";echo $rowData[5]. " ";
echo "
";echo "
";echo $rowData[6]. " ";
echo "
";echo "
";echo $rowData[7]. " ";
echo "
";echo "
";echo $rowData[8]. " ";
echo "
";echo "
";}
?>