Result not appropriate when generate Date
<pre><code>$date_from = @$_REQUEST['Start'];   
$date_from = strtotime($date_from); // Convert date to a UNIX timestamp
$date_to = @$_REQUEST['Finish'];   
$date_to = strtotime($date_to);
$day = 86400;

for ($i=$date_from; $i&lt;=$date_to; $i+=86400) 
{  
   echo date("Y-m-d",$i);
}
</code></pre>

<p>I encounter some problem with this code. Basically this code run well, but when you fill value $date_from = '2016-10-28' AND value $date_to = '2016-11-03', The Result appear in my screen :</p>

<blockquote>
  <p>2016-10-28
  <br> 2016-10-29
  <br> 2016-10-30
  <br> 2016-10-30
  <br> 2016-10-31
  <br> 2016-11-01
  <br> 2016-11-02</p>
</blockquote>

<p>When it was supposed to be :</p>

<blockquote>
  <p>2016-10-28
  <br> 2016-10-29
  <br> 2016-10-30
  <br> 2016-10-31
  <br> 2016-10-01
  <br> 2016-11-02
  <br> 2016-11-03</p>
</blockquote>

<p>Is there's error on my code or ? Because i have tried with different range but, everything went fine. Only this range of date appear like this.</p>

<p>Need Help.</p>