Open Meistercoach83 opened 7 years ago
I also ran into this and had to resort to pulling it out of the attributes. It works, but definitely seems like a bug. This should work, I think:
foreach($html('div.club-matches table tbody tr') as $index => $row) {
$class = '';
if ( isset( $row->attributes['class'] ) ) {
$class = $row->attributes['class'];
}
echo $index;
echo $class;
echo $row->getPlainText(), "<br>\n";
}
Hi,
I´m trying to get the row´s css-Classes from this small html-snippet:
my current code:
My Problem: I can display the PlainText from each row - but not its css-Class.. what´s wrong with my code?
** edit: When I do an
I get
}