Hi,
the following for loop will give the date for the next few weeks from todays date.
Code:
for ( $counter = 0; $counter < $recurrent; $counter += 1)
{
$day = date('Y-m-d', strtotime("+ $counter weeks"));
}
But I need it to give the date for the next few weeks from any given date. I've tried:
Code:
for ( $counter = 0; $counter < $recurrent; $counter += 1)
{
$date = $_POST['date']
$day = date('$date', strtotime("+ $counter weeks"));
}
where $date is a date variable in the form yyyy-mm-dd but this doesn't seem to work.
Could someone give me a hand.
Cheers