forked from paquettg/php-html-parser
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
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)');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
$nth = $node->find($rule['tag'], $rule['key']);
if ($nth) {
$return[] = $nth;
}and line 188 of
return []; to
return $return; and now works with tr td[1] selector
Does not this selector work or am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels
