Created
January 12, 2015 21:19
-
-
Save LinzardMac/df838278bb07cbeb1d7f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$date_start = strtotime('first day of next month'); | |
$end_date = strtotime("last day of next month", $date_start); | |
while ($date_start <= $end_date) : | |
$weekdates[] = date("Y-m-d", $date_start); | |
$date_start = strtotime('+1 day', $date_start); | |
endwhile; | |
foreach ( $weekdates as $days): | |
echo 'should be 28 times'; | |
endforeach; | |
} | |
***instead of 28 results I am getting 59. When I dump the $weekdates I get from feb1 - mar31 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment