title: Filter an array by date
body: <p>So I have the following array: </p>
  
  <pre><code>Array
  (
    [2015-07-10] =&gt; 94
    [2015-07-07] =&gt; 20
    [2015-07-13] =&gt; 6
    [2015-07-09] =&gt; 42
    [2015-07-08] =&gt; 48
  )
  </code></pre>
  
  <p>This array get data from last 7 days, now I want to filter this array by date and add value = 0 if data not exists. For example if execute this cron today so I need to get data from 07-07-2014 ---- 14-07-2014, for my example I need transform the array like this :</p>
  
  <pre><code>     Array
           (
             [2015-07-07] =&gt; 20
             [2015-07-08] =&gt; 48
             [2015-07-09] =&gt; 42
             [2015-07-10] =&gt; 94
             [2015-07-11] =&gt; 0
             [2015-07-12] =&gt; 0
             [2015-07-13] =&gt; 6
             [2015-07-14] =&gt; 0 
  )
  </code></pre>
  
  <p>I tried to make an ksort like this : <code>ksort($aFilterdFlashParties)</code> but it did not work. Help me please. Thx in advance. Exist a solution?</p>