PHP Group By Day
<p>Given this array:</p>

<pre><code>    array(1) {
  [0]=&gt;
  array(2) {
    ["Project"]=&gt;
    array(5) {
      ["id"]=&gt;
      string(1) "2"
      ["user_id"]=&gt;
      string(2) "21"
      ["customer_id"]=&gt;
      string(1) "4"
      ["name"]=&gt;
      string(15) "WordPress Theme"
      ["created"]=&gt;
      string(19) "2011-09-26 21:30:38"
    }
    ["Track"]=&gt;
    array(1) {
      [0]=&gt;
      array(8) {
        ["id"]=&gt;
        string(1) "7"
        ["user_id"]=&gt;
        string(2) "21"
        ["project"]=&gt;
        string(1) "2"
        ["customer"]=&gt;
        string(1) "4"
        ["title"]=&gt;
        string(7) "Backend"
        ["notes"]=&gt;
        string(0) ""
        ["created"]=&gt;
        string(19) "2011-09-28 22:21:22"
        ["Lapse"]=&gt;
        array(2) {
          [0]=&gt;
          array(5) {
            ["id"]=&gt;
            string(1) "4"
            ["track_id"]=&gt;
            string(1) "7"
            ["start"]=&gt;
            string(19) "2011-09-28 22:22:21"
            ["stop"]=&gt;
            string(19) "2011-09-28 22:22:30"
            ["created"]=&gt;
            string(19) "2011-09-28 22:22:21"
          }
          [1]=&gt;
          array(5) {
            ["id"]=&gt;
            string(1) "3"
            ["track_id"]=&gt;
            string(1) "7"
            ["start"]=&gt;
            string(19) "2011-09-28 22:22:07"
            ["stop"]=&gt;
            string(19) "2011-09-28 22:22:12"
            ["created"]=&gt;
            string(19) "2011-09-28 22:22:07"
          }
        }
      }
    }
  }
}
</code></pre>

<p>How would i group by Day in the Lapse Array with PHP? This may have been easier to do directly with MySQL but i'm using CakePHP's recursive function and i cant figure out how to use Group By with that!</p>
