Closed chimmel closed 8 years ago
What you need is acrtually nextElementSibling()
method that I've just implemented.
I couldn't use the name next()
because it is part of Iterable
interface and has a different meaning there.
Note: There is also a :next
pseudo-selector which enables you to fetch next sibling using find('.product-options dt:next')
.
foreach($prod->find('.product-options dt') as $v) { echo str_replace('*','', $v->text()).' '; echo $v->next(); }
The next element is a dd, but echo next returns nothing. How do I get the next element object? I need to get the values for dt and dd within every dl, but dd is a select element with multiple values I need.