title: PHP Split array by Key -> Valuue
body: <p>I have an array that contains some data and I want to split it by year to get subarrays with YEAR as value and array of items with same year as key.
  Start array looks like:</p>
  <pre><code>$arr = [
     0 =&gt; Array(
       'name' =&gt; 'Some name',
       'description' =&gt; 'some description',
       'year' =&gt; 2019
     ),
     1 =&gt; Array(
       'name' =&gt; 'Some name 1',
       'description' =&gt; 'some description 1',
       'year' =&gt; 2020
     ),
     2 =&gt; Array(
       'name' =&gt; 'Some name 2',
       'description' =&gt; 'some description 2',
       'year' =&gt; 2020
     ),
  ];
  </code></pre>
  <p>And I want to get an array splited by Year like this:</p>
  <pre><code>$arr = [
    '2019' =&gt; Array(
        0 =&gt; Array(
           'name' =&gt; 'Some name',
           'description' =&gt; 'some description',
           'year' =&gt; 2019
         ),
    ),
    '2020' =&gt; Array(
         0 =&gt; Array(
           'name' =&gt; 'Some name 1',
           'description' =&gt; 'some description 1',
           'year' =&gt; 2020
         ),
         1 =&gt; Array(
           'name' =&gt; 'Some name 2',
           'description' =&gt; 'some description 2',
           'year' =&gt; 2020
         ),
    ),
  ];
  </code></pre>
  <p>What PHP function can do this?</p>