Can someone help me with this please. Trying to calculate week dates within a period entered by the user. How would I go about that? I have this thus far
$interval=new DateInterval('P6D');
$period = new DatePeriod($begindate,$interval,$enddate);
foreach($period as $date){
echo $date->format("Y/m/d") . "<br>";
}
if ($period){
return true;
}
else {
return false;
}
2017/08/06 2017/08/12 2017/08/18 The first two outputs are ok but rather than 2017/08/18, I would like 2017/08/13 2017/08/19 and even though they are in the database its still giving the error message that it is not there