[eluser]jant90[/eluser]
This is more a general PHP question than a CI one, but it's for an application I'm working on inside the CI framework so I decided I would ask for help on this forum

.
I'm trying to get all span elements inside a table from a certain HTML page. The table had an unique ID and therefore I can get it as follows:
Code:
$doc->getElementById("table_id");
Now I want all spans inside that table so I can read the nodeValues, if I wanted to get all of them inside the HTML page I would use:
Code:
foreach($doc->getElementsByTagName('span') as $data) {
echo $data->nodeValue;
}
How do I make sure I only get the spans inside table_id?