title: Extract data from Multi-Dimensional Array based on datetime field PHP
body: <p>I have a Multi-Dimensional Array and need to extract the data from it based on if the datetime field is between a certain date range.</p>
  
  <p>The datetime column is in unix timestamp.</p>
  
  <p>I already know how to sort the array based on the date, but now I want to only return portions of the array if the datetime field is from a certain month or certain year.</p>
  
  <p>The keys need to be preserved.</p>
  
  <p>Array example:</p>
  
  <pre><code>&lt;?
  $videoids = array(
  
      'iD-7H6Rv-SM' =&gt; array
      (
      'datetime' =&gt; '1421693217',
      'title' =&gt; 'title',
      'description' =&gt; 'description',
      'channel' =&gt; 'info',
      'url' =&gt; 'url'
      ),
  
      'X9tzt0MEIRI' =&gt; array
      (
      'datetime' =&gt; '1422784090',
      'title' =&gt; 'title',
      'description' =&gt; 'description',
      'channel' =&gt; 'info',
      'url' =&gt; 'url'
      ),
  
      'TaFgrY9HsUA' =&gt; array
      (
      'datetime' =&gt; '1418712579',
      'title' =&gt; 'title',
      'description' =&gt; 'description',
      'channel' =&gt; 'info',
      'url' =&gt; 'url'
      ),
  
      'i9PGMYb7Aoc' =&gt; array
      (
      'datetime' =&gt; '1404178390',
      'title' =&gt; 'title',
      'description' =&gt; 'description',
      'channel' =&gt; 'info',
      'url' =&gt; 'url'
      ),
  
  );?&gt;
  </code></pre>
  
  <p>The first 2 inner arrays datetime fields are from year 2015</p>
  
  <p>The last 2 inner arrays datetime fields are from year 2014</p>
  
  <p>how can I extract only the inner arrays containing a time stamp with year 2014?</p>
  
  <p>I want to display data from the array from year and possibly even break it down by month.</p>
  
  <p>Example:</p>
  
  <p><code>click here to display data from 2015</code></p>
  
  <p><code>click here to display data from January</code></p>