Skip to content

Parser not getting the css-Class!? #68

Description

@Meistercoach83

Hi,

I´m trying to get the row´s css-Classes from this small html-snippet:

<div class="club-matches">
			<table class="table">
				<tbody>
					<tr class="row-mainInfo">
						<td colspan="6">Samstag, 26.08.2017 - 18:00 Uhr | CS:GO | Friendly</td>
					</tr>

my current code:

foreach($html('div.club-matches table tbody tr') as  $index => $row) {
            echo $index;
            echo $row->class;
            echo $row->getPlainText(), "<br>\n";
        }

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

var_dump($row->attributes);

I get

array(1) {
  ["class"]=>
  string(26) "row-mainInfo"

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions