$goutte = new GoutteClient();
$crawler = $goutte->request('GET', 'https://www.website.com');
$reviewContent = $crawler->filter('.review-content');
$rows = $reviewContent->filter('.row');
foreach ($rows as $row) {
$col1 = $row->filter('.col-md-3');
$col2 = $row->filter('.col-md-9');
}
Giving the error on $col1
I can get it working using this but you can't use break
as it's not a real for loop
$crawler->filter('.row')->each(function (Crawler $row, $i) {
$col1 = $row->filter('.col-md-3');
$col2 = $row->filter('.col-md-9');
...
...
}