title: Sort Multiarray in php
body: <p>I need some help about sorting a multiple array.
   This is what I got:</p>
  
  <pre><code>Array ( 
     [ALU0000001] =&gt; 
           Array ( [0] =&gt; Array ( [period] =&gt; 2012 [codCurse] =&gt; S12-2030 [idPersona] =&gt; ALU0000001 [date] =&gt; 2012-04-02 [amount] =&gt; 238.00 [active] =&gt; X ) 
                   [1] =&gt; Array ( [period] =&gt; 2012 [codCurse] =&gt; S12-2030 [idPersona] =&gt; ALU0000001 [date] =&gt; 2012-05-02 [amount] =&gt; 238.00 [active] =&gt; X )
                   [2] =&gt; Array ( [period] =&gt; 2012 [codCurso] =&gt; S12-2030 [idPersona] =&gt; ALU0000001 [date] =&gt; 2012-06-02 [amount] =&gt; 238.00 [active] =&gt; X )
                   [3] =&gt; Array ( [period] =&gt; 2013 [codCurso] =&gt; S12-2030 [idPersona] =&gt; ALU0000001 [date] =&gt; 2013-01-02 [amount] =&gt; 238.00 [active] =&gt; X )
  
     [ALU0000005] =&gt;
           Array ( [0] =&gt; Array ( [period] =&gt; 2013 [codCurse] =&gt; S13-2010 [idPersona] =&gt; ALU0000005 [date] =&gt; 2013-03-01 [amount] =&gt; 225.00 [active] =&gt; X )
                   [1] =&gt; Array ( [period] =&gt; 2013 [codCurse] =&gt; S13-2010 [idPersona] =&gt; ALU0000005 [date] =&gt; 2013-03-02 [amount] =&gt; 333.00 [active] =&gt; X ) 
                   [2] =&gt; Array ( [period] =&gt; 2013 [codCurse] =&gt; S13-2010 [idPersona] =&gt; ALU0000005 [date] =&gt; 2013-04-02 [amount] =&gt; 333.00 [active] =&gt; X ) 
  </code></pre>
  
  <p>I need to sort multiarray by period date to get something like this</p>
  
  <pre><code>  Y   M   D
    2012 2012-04-02 ALU00000001 .....
    2012 2012-05-02 ALU00000005 .....
    2012 2012-06-01 ALU00000001 .....
    2013 2013-01-01 ALU00000001 .....
    2013 2013-06-01 ALU00000001 .....
    2013 2013-12-24 ALU00000005 .....
  </code></pre>
  
  <p>Thanks</p>