title: generate array from php while loop
body: <p>I want to run a while(or any) loop to output a small list of dates as an array</p>
  
  <pre><code>$start = $day = strtotime("-1 day");
  $end = strtotime('+6 day');
  while($day &lt; $end)
  {
      echo  date('d-M-Y', $day) .'&lt;br /&gt;';
      $day = strtotime("+1 day", $day) ;
  }
  </code></pre>
  
  <p>This works fine for printing, but I want to save it as an array (and insert it in a mysql db).
  Yes! I don't know what I'm doing.</p>