title: Sorting multi-tier and multi-dimensional array in PHP
body: <p>My first question post here, although I'm a long time user. My PHP skills aren't advanced. I'm using PHP7 BTW.</p>
  
  <p>I've found similar questions to this one, but not with the tier element, and so none of the answers I've tried so far have worked. It's probably obvious to a more experienced PHP programmer.</p>
  
  <p>I've got some data in the json format, and decoded it into the following array:</p>
  
  <pre><code>Array ( 
      [soc] =&gt; 3421 
      [series] =&gt; Array ( 
              [0] =&gt; Array ( [year] =&gt; 2013 [estpay] =&gt; 620 ) 
              [1] =&gt; Array ( [year] =&gt; 2015 [estpay] =&gt; 580 ) 
      ) 
  )
  </code></pre>
  
  <p>The data source varies, and so some times there are more years data available and sometimes less. It will also change over time as new data is added.</p>
  
  <p>I want to sort the array so that the most recent year is always first. As I mentioned earlier, I've tried a few of the solutions that have been posted on here for multidimensional arrays, but the data I'm using has the multidimensional array in a lower tier of the array, and so I haven't been able to work out how to change the example code for multidimensional arrays to work around this.</p>
  
  <p>As I mentioned, I'm no PHP expert, so please make no assumptions on my skill level in any replies. Thanks for your help!</p>