You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$dom->find(…) does not work with a CSS selector with multiple attributes.
Example:
$testDom = newDom();
$testDom->loadStr('<div><input type="checkbox" name="color" value="blue"><input type="checkbox" name="color" value="red"></div>');
$allCheckboxes = $testDom->find('input[name="color"]');
echocount($allCheckboxes); // 2 → that is fine$blueCheckbox = $testDom->find('input[name="color"][value="blue"]', 0);
echois_null($blueCheckbox); // true → Not good! I would expect the checkbox with value "blue" here.
Workaround: One could select just for the value $testDom->find('input[value="blue"]', 0); but this could of course find results with unwanted name-attributes too.
The text was updated successfully, but these errors were encountered:
$dom->find(…)
does not work with a CSS selector with multiple attributes.Example:
Workaround: One could select just for the value
$testDom->find('input[value="blue"]', 0);
but this could of course find results with unwantedname
-attributes too.The text was updated successfully, but these errors were encountered: