title: PHP Sort Array By SubArray Value
body: <p>I have the following array structure:</p>
  
  <pre><code>Array
          (
              [0] =&gt; Array
                  (
                      [configuration_id] =&gt; 10
                      [id] =&gt; 1
                      [optionNumber] =&gt; 3
                      [optionActive] =&gt; 1
                      [lastUpdated] =&gt; 2010-03-17 15:44:12
                  )
  
              [1] =&gt; Array
                  (
                      [configuration_id] =&gt; 9
                      [id] =&gt; 1
                      [optionNumber] =&gt; 2
                      [optionActive] =&gt; 1
                      [lastUpdated] =&gt; 2010-03-17 15:44:12
                  )
  
              [2] =&gt; Array
                  (
                      [configuration_id] =&gt; 8
                      [id] =&gt; 1
                      [optionNumber] =&gt; 1
                      [optionActive] =&gt; 1
                      [lastUpdated] =&gt; 2010-03-17 15:44:12
                  )
      )
  </code></pre>
  
  <p>What is the best way to order the array in an incremental way, based on the <code>optionNumber</code>?</p>
  
  <p>So the results look like:</p>
  
  <pre><code>Array
          (
              [0] =&gt; Array
                  (
                      [configuration_id] =&gt; 8
                      [id] =&gt; 1
                      [optionNumber] =&gt; 1
                      [optionActive] =&gt; 1
                      [lastUpdated] =&gt; 2010-03-17 15:44:12
                  )
  
              [1] =&gt; Array
                  (
                      [configuration_id] =&gt; 9
                      [id] =&gt; 1
                      [optionNumber] =&gt; 2
                      [optionActive] =&gt; 1
                      [lastUpdated] =&gt; 2010-03-17 15:44:12
                  )
  
              [2] =&gt; Array
                  (
                      [configuration_id] =&gt; 10
                      [id] =&gt; 1
                      [optionNumber] =&gt; 3
                      [optionActive] =&gt; 1
                      [lastUpdated] =&gt; 2010-03-17 15:44:12
                  )
      )
  </code></pre>