Created
October 5, 2019 15:19
-
-
Save alexalannunes/7ecaad3c88ab326aa34dc6b9e306c8c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// intervalo de datas | |
// 1 day | |
// 30 minutes | |
$d1 = '2019-01-01'; | |
$d2 = '2019-01-20'; | |
$i = 0; | |
while ($d1 <= $d2) { | |
// echo $i. '<br>'; | |
$d1 = date('Y-m-d H:i:s', strtotime('+ 1 hour', strtotime($d1))); | |
echo $d1 . '<br />'; | |
$i++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment