When I search for tr td: nth-child (1) returns all elements and when I search for tr td [1] does not return anything, am I doing something wrong here? with PhpSimple works normal.
$dom = new Dom;
$dom->load('HTML TABLE');
$tds = $dom->find('tr td:nth-child(1)');
Returns

with
$tds = $dom->find('tr td[1]');
returns nothing.
I edited the file Selector.php, I added this after line 172
after line 185
$nth = $node->find($rule['tag'], $rule['key']);
if ($nth) {
$return[] = $nth;
}
and line 188 of
to
and now works with tr td[1] selector
Does not this selector work or am I doing something wrong?
When I search for tr td: nth-child (1) returns all elements and when I search for tr td [1] does not return anything, am I doing something wrong here? with PhpSimple works normal.
Returns

with
$tds = $dom->find('tr td[1]');returns nothing.
I edited the file Selector.php, I added this after line 172
$return = [];after line 185
and line 188 of
return [];to
and now works with tr td[1] selector
Does not this selector work or am I doing something wrong?