title: array grouping which contains same fields
body: <p>I have an array which contains following values.</p>
  
  <pre><code>array(
  'dates' =&gt; array(
      (int) 0 =&gt; '2013-04-22',
      (int) 1 =&gt; '2013-04-23',
  ),
  'publisherName' =&gt; array(
      (int) 0 =&gt; 'Comp1',
      (int) 1 =&gt; 'Comp2',
  ),
  'loaded' =&gt; array(
      (int) 0 =&gt; (int) 2189,
      (int) 1 =&gt; (int) 37,
  ),
  'clicks' =&gt; array(
      (int) 0 =&gt; (int) 0,
      (int) 1 =&gt; (int) 0,
  ),
  'ctr' =&gt; array(
      (int) 0 =&gt; (int) 0,
      (int) 1 =&gt; (int) 0,
  )
  )
  </code></pre>
  
  <p>What I want to produce is getting company based data on different dates like the array below. </p>
  
  <p>How am I able to create an array which is like;</p>
  
  <pre><code>array (
      '2013-04-22'=&gt;array(
          'publisherName'=&gt;'Comp1',
          'loaded'=&gt;2189,
          'clicks'=&gt;0,
          'ctr'=&gt;0),
      '2013-04-23'=&gt;array(
          'publisherName'=&gt;'Comp2',
          'loaded'=&gt;37,
          'clicks'=&gt;0,
          'ctr'=&gt;0)
      ...
  )
  </code></pre>
  
  <p>Which contains daily stats but which comes from <code>publishername</code> field.</p>
  
  <p>Any ideas?</p>