title: Fill missing days in data
body: <p>I have an array which looks like this:</p>
  
  <pre><code>$data = array(
      array('timestamp' =&gt; 1312776000, 'something' =&gt; 100), // data for 08.08.2011
      array('timestamp' =&gt; 1312862400, 'something' =&gt; 120), // data for 09.08.2011
      //  ????????                                          // data for 10.08.2011
      array('timestamp' =&gt; 1313035200, 'something' =&gt; 160), // data for 11.08.2011
      array('timestamp' =&gt; 1313121600, 'something' =&gt; 180), // data for 12.08.2011
      array('timestamp' =&gt; 1313208000, 'something' =&gt; 200), // data for 13.08.2011
      //  ????????                                          // data for 14.08.2011
      //  ????????                                          // data for 15.08.2011
      //  ????????                                          // data for 16.08.2011
      //  ????????                                          // data for 17.08.2011
      array('timestamp' =&gt; 1313640000, 'something' =&gt; 300), // data for 18.08.2011
  );
  </code></pre>
  
  <p>How to identify "holes" and fill them with a subarray with 'something' => 0? As you can see, "holes" can be very large, that is why i was not able to solve this problem myself - my algorithm can fill only tiny "holes" (like 10.08.2011, but not 14.08.2011 -> 17.08.2011).</p>