Skip to content
Discussion options

You must be logged in to vote

The crawler exposes a getNode method returning a DOMNode, which exposes an $attributes property yielding DomAttrs:

foreach ($crawler->getNode(0)->attributes as $attribute) {
    dump($attribute->name, $attribute->value);
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tacman
Comment options

@MatTheCat
Comment options

Answer selected by tacman
@tacman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants