title: multi dimensional array sorting by string
body: <p>I'm breaking my head trying to figure out how to do this right, I have this multi dimensional array:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [time] =&gt; November 1st 10:10
              [query] =&gt; movies
              [set] =&gt; 1
              [matches] =&gt; No matching results
              [results] =&gt; 5
          )
  
      [1] =&gt; Array
          (
              [time] =&gt; November 1st 10:10
              [query] =&gt; cinemas
              [set] =&gt; 1
              [matches] =&gt; No matching results
              [results] =&gt; 2
          )
  
  )
  </code></pre>
  
  <p>In real life, there could be alot more sub-arrays, but et's say I want to sort it by "query" alphabetically, how can I achieve this?</p>
  
  <p>I saw only solutions for integer type or key index, the end result, in this case, would be:</p>
  
  <pre><code>Array
      (
          [0] =&gt; Array
              (
                  [time] =&gt; November 1st 10:10
                  [query] =&gt; cinemas
                  [set] =&gt; 1
                  [matches] =&gt; No matching results
                  [results] =&gt; 2
              )
          [1] =&gt; Array
              (
                  [time] =&gt; November 1st 10:10
                  [query] =&gt; movies
                  [set] =&gt; 1
                  [matches] =&gt; No matching results
                  [results] =&gt; 5
              )
  
      )
  </code></pre>
  
  <p>Much appreciated, thanks.</p>