Last active
April 18, 2017 00:51
-
-
Save muhfaris/b5b4a9de633ee97f4033b41ca8e7d7c2 to your computer and use it in GitHub Desktop.
Get all of sunday
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
<?php | |
$start = strtotime("now"); | |
$end = strtotime("last day of a month"); | |
$getMonday= array(); | |
$datelistMonday=""; | |
$Monday= strtotime("Sunday", $start); | |
while($Monday <= $end) { | |
$getMonday[] .=',"'.date("Y-m-d",$Monday).'"'; | |
$Monday= strtotime("+1 weeks", $Monday); | |
} | |
print_r($getMonday[]); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment