title: Sort multidimensional array by usort
body: <p>I want to create universal function to sort multidimensional array.
  For example: I have this array</p>
  
  <pre><code>$arr = [
      [
          'product' =&gt; [
              'id' =&gt; 32,
          ],
          'price' =&gt; 23.8,
      ],
      [
          'product' =&gt; [
              'id' =&gt; 2,
          ],
          'price' =&gt; 150,
      ],
  ];
  </code></pre>
  
  <p>And I need to sort by <code>$arr[0]['product']['id']</code>. I want to use sort smthg like that: <code>usort($arr, sortArray('product.id', 'desc'));</code></p>
  
  <p>Could you provide some idea how I can do it?</p>