Symfony\Component\DomCrawler\Crawler::each
Calls an anonymous function on each node of the list.
The anonymous function receives the position and the node wrapped in a Crawler instance as arguments. Example: $crawler->filter('h1')->each(function ($node, $i) { return $node->text(); });
Signature
public function each(Closure
$closure )
Parameters
$closure
— \Closure- An anonymous function
Returns
- array
- An array of values returned by the anonymous function