so far I have:
$crawler->filter('li.date, dt > a, li.style')->each(function ($node) {
$output = $node->text()."\n";
$array = explode("\n", $output);
$data = array_chunk($array, 3);
// print_r($data);
foreach ($data as $row) {
[$date, $title, $type] = array_pad($row, 3, null);
// here you have your variables
print 'Date: '.$date;
print 'Title: '.$title;
print 'Type: '.$type;
}
});
and this outputs:
Only $date variable is set for each?! please help??
it should be:
Date: Saturday 13th Jun 2020Title: Alice in Chains UKType: Metal/ Rock
Date: Monday 29th Jun 2020Title: Cage the ElephantType: Funk/ Rock and so on....