Open shinedira opened 4 years ago
instead of doing that you can use a foreach loop where you can use a break.
imagine to have something like $nodes = $crawler->filter('.someclass')
; that returns an array of multiple .someclass elements.
Then you can do:
foreach ($nodes as $node) { $dom = new Crawler($node); // your other code }
then everything else...and because it's a foreach loop you can break it
i want to break foreach on each chain on filter