Loop between Two Dates in PHP
There are times that you want to loop between two dates in PHP. If you have, for example, formatted the date like m/d/Y, you cannot simply use it in while loop statement.
Before you can loop between two dates in PHP, you need to convert it first to Unix timestamp using the strtotime function.
Here’s an example of how to do it: