title: how to arrange multidimensional array - Group by value in php?
body: <p>I want to arrange same date items to single index, I have following array -</p>
  
  <pre><code>Array(
  [0] =&gt; Array
      (
          [date] =&gt; 30 Dec 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 84675
                  [name] =&gt; Item1
              )
      )
  [1] =&gt; Array
      (
          [date] =&gt; 28 Dec 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 84675
                  [name] =&gt; item2
              )
      )
  [2] =&gt; Array
      (
          [date] =&gt; 22 Nov 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 2011
                  [name] =&gt; item3
              )
      )
  [3] =&gt; Array
      (
          [date] =&gt; 22 Nov 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 86649
                  [name] =&gt; item4
              )
      ))
  </code></pre>
  
  <p>I want to arrange this array like -</p>
  
  <pre><code>Array(
  [0] =&gt; Array
      (
          [date] =&gt; 30 Dec 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 84675
                  [name] =&gt; Item1
              )
      )
  [1] =&gt; Array
      (
          [date] =&gt; 28 Dec 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 84675
                  [name] =&gt; item2
              )
      )
  [2] =&gt; Array
      (
          [date] =&gt; 22 Nov 2015
          [record] =&gt; Array
              (
                  [id] =&gt; 2011
                  [name] =&gt; item3
              ),Array
              (
                  [id] =&gt; 86649
                  [name] =&gt; item4
              )
      )
  )
  </code></pre>
  
  <p>I want to arrange same date items into single index, can anybody please help me.I tried to arrange it using loops but couldn't get success.Any help would be really appreciated. </p>
  
  <p>Thanks!</p>