title: How to make 15 days bunch array within 2 different dates in PHP?
body: <p>Below is the output which I want in php.</p>
  
  <p>Suppose I pass the two different dates in a function.</p>
  
  <p>lets say I passed "<code>01/01/2016 to 07/25/2016</code>" Into function</p>
  
  <pre><code>function bunch_days15($date1, $date2){
  }
  </code></pre>
  
  <p>How do I get the below results of 15 days set ?</p>
  
  <pre><code>array{
  
    [0] =&gt; {
  
             [0] 01/01/2016
             [1] 01/15/2016
           }
  
    [1] =&gt; {
  
           [0] 01/16/2016
           [1] 01/31/2016
    }
  
    [2] =&gt; {
  
             [0] 02/01/2016
             [1] 02/15/2016
  
           }
  
    [3] =&gt; {
  
           [0] 02/16/2016
           [1] 02/28/2016
    }
  }
  </code></pre>
  
  <p>And soo</p>
  
  <p>Please let me know through common functions in which I passed 2 different dates and it will return array in the bunch of 15 days results.</p>