Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*** Populate Dates ***/
- /*** $i as the count integer - $d as the total number of days ***/
- function populateDates()
- {
- $i = 0; $d = 14;
- $start_date = strtotime(date("Y-m-d"));
- $returnVar = "";
- while($i <= $d){
- $nextDate = date('Y-m-d', $start_date + ($i * 60 * 60 *24));
- if (date('l', strtotime($nextDate)) != "Sunday" && date('l', strtotime($nextDate)) != "Saturday") {
- $addDate = date('d-m-Y', strtotime($nextDate));
- $returnVar .= $nextDate."|".$addDate.",";
- } $i++;
- } return $returnVar;
- }
Add Comment
Please, Sign In to add comment