title: Push rows with default values into an array containing dates so there are no gaps between dates
body: <p>I have an array of rows with date values, but not all dates are guaranteed between the first and last row.  I need to add rows so that every date has a row (a default value should be applied for the secondary column value).</p>
  <p>Sample input:</p>
  <pre><code>$array = [
      ['date' =&gt; '2017-09-01', 'total' =&gt; 4],
      ['date' =&gt; '2017-09-03', 'total' =&gt; 6],
      ['date' =&gt; '2017-09-04', 'total' =&gt; 1],
      ['date' =&gt; '2017-09-05', 'total' =&gt; 3],
      ['date' =&gt; '2017-09-09', 'total' =&gt; 5]
  ];
  </code></pre>
  <p>I want to fill the date even if my query has no records on that date!
  How can I add the missing date index to the array. The dates are to be sequential/contiguous.</p>
  <p>Desired output:</p>
  <pre><code>[
      ['date' =&gt; '2017-09-01', 'total' =&gt; 4],
      ['date' =&gt; '2017-09-02', 'total' =&gt; 0],
      ['date' =&gt; '2017-09-03', 'total' =&gt; 6],
      ['date' =&gt; '2017-09-04', 'total' =&gt; 1],
      ['date' =&gt; '2017-09-05', 'total' =&gt; 3],
      ['date' =&gt; '2017-09-06', 'total' =&gt; 0],
      ['date' =&gt; '2017-09-07', 'total' =&gt; 0],
      ['date' =&gt; '2017-09-08', 'total' =&gt; 0],
      ['date' =&gt; '2017-09-09', 'total' =&gt; 5]
  ]
  </code></pre>