php - How can I count the number of weeks between two dates but also the dates for Monday to Friday within that week number?

one text

I'm trying to work out the amount of weeks between two dates using PHP7 but then loop though and show me the weekday dates for each of these week numbers.

Eg.

Start date January 1st 2020 February 28th 2020

Week 1

Monday December 30th 2019

Tuesday December 31st 2019

Wednesday January 1st 2020

Thursday January 2nd 2020

Friday January 3rd 2020

Week 2

Monday 6th January 2020

Tuesday 7th January 2020

Wednesday 8th January 2020

Thursday 9th January 2020

Friday 10th January 2020

Any help will be appreciated Thankyou!

Sorry for the formatting

Source