title: PHP GROUP DATA COMPARE
body: <p>how can group date and calculate sum of weight then put assoc array php?</p>
  
  <pre><code>{name:"A",date:"2012-12-11",order:1,time:3,weight:10},
  {name:"A",date:"2012-12-11",order:1,time:4,weight:12},
  {name:"B",date:"2012-12-11",order:1,time:3,weight:17},
  {name:"A",date:"2012-12-12",order:1,time:5,weight:50},
  {name:"A",date:"2012-12-12",order:2,time:3,weight:70}
  </code></pre>
  
  <p>According this sum of weight day by day but problem is if(same date same order same name ; which one greater time take its weight, dont care less) but different name or order take sum of group.</p>
  
  <p>Result must be like:</p>
  
  <pre><code>{date:2012-12-11,weight:29},
  {date:2012-12-12,weight:120},
  </code></pre>
  
  <p>Anyone Help ? 
  it can be like:</p>
  
  <pre><code>   {name:"A",date:"2012-12-11",order:1,time:3,weight:10}, 
      {name:"B",date:"2012-12-11",order:1,time:3,weight:17},
      {name:"A",date:"2012-12-11‌​",order:1,time:4,weight:12},
       {name:"A",date:"2012-12-12",order:1,time:5,weight:50},
       {name:"A",date:"2012-12-12",order:2,time:3,weight:70}
  </code></pre>