title: array merging into multi dimensional array
body: <p>I need a way to merge</p>
  
  <pre><code>Array(
    [0] =&gt; Array
       (
        [event_id] =&gt; 1
        [time] =&gt; '21:00pm'
        [day] =&gt; 'Monday'
       )
    [1] =&gt; Array
      (
        [event_id] =&gt; 2
        [time] =&gt; '18:00pm'
        [day] =&gt; 'Monday'
       )
    [2] =&gt; Array
      (
        [event_id] =&gt; 3
        [time] =&gt; '21:00pm'
        [day] =&gt; 'Tuesday'
       )
   )
  </code></pre>
  
  <p>into:</p>
  
  <pre><code>Array (
    [0] =&gt; Array
        (
            [event_id] =&gt; Array
                  (
                   [0] =&gt; 1
                   [1] =&gt; 2
                  )
            [time] =&gt; Array
                 (
                   [0] =&gt; '21:00pm'
                   [1] =&gt; '18:00pm'
                  )
            [day] =&gt; 'Monday'
        )
     [1] =&gt; Array
       (
            [event_id] =&gt; 3
            [time] =&gt; '21:00pm'
            [day] =&gt; 'Tuesday'
       )
  )
  </code></pre>
  
  <p>So the new array is grouped by the day key and if the values are different between the merged arrays then the merged value becomes an array.</p>