title: PHP slice associative array
body: <p>This is my array </p>
  
  <pre><code>$array = array(
      "13111" =&gt; "2014-06-21 19:51:00.0000000",
      "23111" =&gt; "2014-06-20 19:51:00.0000000",
      "12111" =&gt; "2014-06-21 19:51:00.0000000",
      "23311" =&gt; "2014-06-22 19:51:00.0000000",
      "13114" =&gt; "2014-06-21 19:51:00.0000000",
      "23711" =&gt; "2014-06-20 19:51:00.0000000",
  );
  </code></pre>
  
  <p>How can i get first 3 elements of my array and how can i sort by datetime? thanks</p>