With the code below I can get elements of an html table using DOM's getElementsByTagName and it works.
$dom = new DOMDocument();
$dom->loadHTMLFile("any.html");
## get table by tagName
$tables= $dom->getElementsByTagName('table');
$table = $tables->item(0);
foreach($table->getElementsByTagName('tr') as $key =>$tr){
$tr->getElementsByTagName('td')->item(0)->nodeValue;
}
but I want to get table by getElementById. Is it possible by using table's id?