<?php
$data = DateTime::createFromFormat('d/m/Y', '09/11/2018'); // Define a data inicial
$fim = DateTime::createFromFormat('d/m/Y', '16/11/2018'); // Define a data final
$intervaloDias = 3; // Define o intervalo de dias
while ($data->format('Y-m-d') <= $fim->format('Y-m-d')) { // Verifica se a data é menor que a data final
echo $data->format('Y-m-d ') . "\n"; // Escreve a data na tela
$data = $data->add(new DateInterval('P'.$intervaloDias.'D')); // Incrementa a data
}
?>
PD9waHAKCSRkYXRhID0gRGF0ZVRpbWU6OmNyZWF0ZUZyb21Gb3JtYXQoJ2QvbS9ZJywgJzA5LzExLzIwMTgnKTsgLy8gRGVmaW5lIGEgZGF0YSBpbmljaWFsCgkkZmltID0gRGF0ZVRpbWU6OmNyZWF0ZUZyb21Gb3JtYXQoJ2QvbS9ZJywgJzE2LzExLzIwMTgnKTsgLy8gRGVmaW5lIGEgZGF0YSBmaW5hbAoJJGludGVydmFsb0RpYXMgPSAzOyAvLyBEZWZpbmUgbyBpbnRlcnZhbG8gZGUgZGlhcwoJCgl3aGlsZSAoJGRhdGEtPmZvcm1hdCgnWS1tLWQnKSA8PSAkZmltLT5mb3JtYXQoJ1ktbS1kJykpIHsgLy8gVmVyaWZpY2Egc2UgYSBkYXRhIMOpIG1lbm9yIHF1ZSBhIGRhdGEgZmluYWwKCQkKCQllY2hvICRkYXRhLT5mb3JtYXQoJ1ktbS1kICcpIC4gIlxuIjsgLy8gRXNjcmV2ZSBhIGRhdGEgbmEgdGVsYQoJCQoJCSRkYXRhID0gJGRhdGEtPmFkZChuZXcgRGF0ZUludGVydmFsKCdQJy4kaW50ZXJ2YWxvRGlhcy4nRCcpKTsgLy8gSW5jcmVtZW50YSBhIGRhdGEKCX0KPz4=