title: Adding missing dates for 1 week back from now
body: <p>I am trying to add the missing dates to this array for 1 week back from now.</p>
  
  <p>This is an example array I have;</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [date] =&gt; 2013-11-25
              [members] =&gt; 2
          )
  
      [1] =&gt; Array
          (
              [date] =&gt; 2013-11-27
              [members] =&gt; 1
          )
  
  )
  </code></pre>
  
  <p>This could have any dates in. I tried things like this, but I can see logically It doesn't work, but I cannot figure out a way.</p>
  
  <pre><code>$date_range = array();
              $temp = array();
             for ($i=0; $i&lt;7; $i++)
              {
                $date = date("Y-m-d", strtotime($i." days ago"));
  
                foreach($new_members as $members) {  
  
                  if(!in_array($date, $members)) {
  
                  $temp['date'] = $date;
  
                  $temp['members'] = 0;
  
                  $new_members[] = array_merge($temp);
  
                }
  
                }
  
  
              }
  </code></pre>