How to get the latest data from array
<p>I have an array called forum_category['children'] than when its contents is dumped looks like :</p>

<pre><code>array(3) {
  [0]=&gt; array(9) { 
    ["forum_category_id"]=&gt; string(1) "3"
    ["name"]=&gt; string(15) "Sub category #1"
    ["description"]=&gt; string(29) "
Test sub category #1
"
    ["topics"]=&gt; string(1) "2"
    ["lastpost"]=&gt; string(27) "Fri Mar 15, 2013 9:04:22 am"
    ["lastpostauthor"]=&gt; string(16) "Justine Smithies"
    ["lastposturl"]=&gt; string(89) "http://test.codetrove.com/index.php?route=forum/read&amp;forum_path=3&amp;forum_post_id=2"
    ["posts"]=&gt; int(2)
    ["href"]=&gt; string(81) "http://test.codetrove.com/index.php?route=forum/forum_category&amp;forum_path=1_3"
  }
  [1]=&gt; array(9) {
    ["forum_category_id"]=&gt; string(1) "9"
    ["name"]=&gt; string(11) "Test cat #3"
    ["description"]=&gt; string(13) "
test
"
    ["topics"]=&gt; string(1) "1"
    ["lastpost"]=&gt; string(27) "Fri Mar 15, 2013 9:29:55 am"
    ["lastpostauthor"]=&gt; string(16) "Justine Smithies"
    ["lastposturl"]=&gt; string(89) "http://test.codetrove.com/index.php?route=forum/read&amp;forum_path=9&amp;forum_post_id=2"
    ["posts"]=&gt; int(1)
    ["href"]=&gt; string(81) "http://test.codetrove.com/index.php?route=forum/forum_category&amp;forum_path=1_9"
  }
  [2]=&gt; array(9) {
    ["forum_category_id"]=&gt; string(1) "7"
    ["name"]=&gt; string(16) "Test sub Sub cat"
    ["description"]=&gt; string(25) "
test sub sub cat
"
    ["topics"]=&gt; string(1) "1"
    ["lastpost"]=&gt; string(27) "Fri Mar 15, 2013 8:58:20 am"
    ["lastpostauthor"]=&gt; string(16) "Justine Smithies"
    ["lastposturl"]=&gt; string(90) "http://test.codetrove.com/index.php?route=forum/read&amp;forum_path=7&amp;forum_post_id=22"
    ["posts"]=&gt; int(2)
    ["href"]=&gt; string(81) "http://test.codetrove.com/index.php?route=forum/forum_category&amp;forum_path=1_7"
  }
}
</code></pre>

<p>How do i get the array with the latest date into another array so i end up with an array called $sub_last and it contains for example :</p>

<pre><code>    array(9) {
    ["forum_category_id"]=&gt; string(1) "9"
    ["name"]=&gt; string(11) "Test cat #3"
    ["description"]=&gt; string(13) "
test
"
    ["topics"]=&gt; string(1) "1"
    ["lastpost"]=&gt; string(27) "Fri Mar 15, 2013 9:29:55 am"
    ["lastpostauthor"]=&gt; string(16) "Justine Smithies"
    ["lastposturl"]=&gt; string(89) "http://test.codetrove.com/index.php?route=forum/read&amp;forum_path=9&amp;forum_post_id=2"
    ["posts"]=&gt; int(1)
    ["href"]=&gt; string(81) "http://test.codetrove.com/index.php?route=forum/forum_category&amp;forum_path=1_9"
  }
</code></pre>

<p>Any help would be great. I can make the lastpost strings become php date values if it helps?</p>

<p>would this work ?</p>

<pre><code>foreach ($forum_category['children'] as $key =&gt; $row) {
$dates[$key]  = $row['lastpost']; 
// of course, replace 0 with whatever is the date field's index
}

 array_multisort($dates, SORT_ASC, $forum_category['children']);
</code></pre>

<p>And then the newest is forum_category['children'][0] ?????</p>
