title: how to generate monthly days with PHP?
body: <p>Im trying to generate days of the current month like this</p>
  
  <pre><code>    $year = date('Y');
      $month = date('m');
  
      $dayCount = cal_days_in_month(CAL_GREGORIAN,$month,$year);
  
      for ($i = 1; $i &lt;= $dayCount; $i++)
      {
          $tree_data-&gt;data[$i] = $year."-".$month."-".$i;
      }
      print "&lt;pre&gt;";
      print_r($tree_data);
  </code></pre>
  
  <p>which gives me output like</p>
  
  <pre><code>stdClass Object
  (
      [data] =&gt; Array
          (
              [1] =&gt; 2011-12-1
              [2] =&gt; 2011-12-2
              [3] =&gt; 2011-12-3
              [4] =&gt; 2011-12-4
              [5] =&gt; 2011-12-5
              [6] =&gt; 2011-12-6
              [7] =&gt; 2011-12-7
              [8] =&gt; 2011-12-8
              [9] =&gt; 2011-12-9
              [10] =&gt; 2011-12-10
              [11] =&gt; 2011-12-11
              [12] =&gt; 2011-12-12
              [13] =&gt; 2011-12-13
              [14] =&gt; 2011-12-14
              [15] =&gt; 2011-12-15
              [16] =&gt; 2011-12-16
              [17] =&gt; 2011-12-17
              [18] =&gt; 2011-12-18
              [19] =&gt; 2011-12-19
              [20] =&gt; 2011-12-20
              [21] =&gt; 2011-12-21
              [22] =&gt; 2011-12-22
              [23] =&gt; 2011-12-23
              [24] =&gt; 2011-12-24
              [25] =&gt; 2011-12-25
              [26] =&gt; 2011-12-26
              [27] =&gt; 2011-12-27
              [28] =&gt; 2011-12-28
              [29] =&gt; 2011-12-29
              [30] =&gt; 2011-12-30
              [31] =&gt; 2011-12-31
          )
  
  )
  </code></pre>
  
  <p>my problem is i want to get 1 - 9 days like</p>
  
  <pre><code>2011-12-01, 2011-12-02 etc...
  </code></pre>
  
  <p>any idea how to get the output like that?</p>