Create and array of all the dates between a start and end date with CarbonPeriod

```
...
$period = CarbonPeriod::create($startDate, $endDate);

foreach ($period as $date) {
	$date->format('Y-m-d');
}

$dates = $period->toArray();
```

Nick Ciolpan
08 Dec 2022
« Back to post