title: how to sort array based on value using php codeigniter in the fastest way?
body: <p>I'm trying to arrange an array based on the value of the elements. Anyway here are my array code:</p>
  
  <pre><code>array (
      [0] =&gt; array (
          [id] =&gt; 5
          [title] =&gt; yesyes3
          [msg] =&gt; yes yes yes yes
          [date] =&gt; 2016-06-05
          [match] =&gt; 1
      )
      [1] =&gt; array (
          [id] =&gt; 4
          [title] =&gt; yes2
          [msg] =&gt; yes yes yes
          [date] =&gt; 2016-06-04
          [match] =&gt; 4
      )
      [2] =&gt; array (
          [id] =&gt; 1
          [title] =&gt; test1
          [msg] =&gt; yes
          [date] =&gt; 2016-06-01
          [match] =&gt; 2
      )
      [3] =&gt; array (
          [id] =&gt; 3
          [title] =&gt; test2
          [msg] =&gt; no
          [date] =&gt; 2016-06-03
          [match] =&gt; 1
      )
      [4] =&gt; array (
          [id] =&gt; 2
          [title] =&gt; yes1
          [msg] =&gt; no
          [date] =&gt; 2016-06-02
          [match] =&gt; 6
      )
  )
  </code></pre>
  
  <p>is there any way for me to arrange them based on match and will look like this?</p>
  
  <pre><code>array (
      [0] =&gt; array (
          [id] =&gt; 2
          [title] =&gt; yes1
          [msg] =&gt; no
          [date] =&gt; 2016-06-02
          [match] =&gt; 6
      )
      [1] =&gt; array (
          [id] =&gt; 4
          [title] =&gt; yes2
          [msg] =&gt; yes yes yes
          [date] =&gt; 2016-06-04
          [match] =&gt; 4
      )
      [2] =&gt; array (
          [id] =&gt; 1
          [title] =&gt; test1
          [msg] =&gt; yes
          [date] =&gt; 2016-06-01
          [match] =&gt; 2
      )
      [3] =&gt; array (
          [id] =&gt; 3
          [title] =&gt; test2
          [msg] =&gt; no
          [date] =&gt; 2016-06-03
          [match] =&gt; 1
      )
      [4] =&gt; array (
          [id] =&gt; 5
          [title] =&gt; yesyes3
          [msg] =&gt; yes yes yes yes
          [date] =&gt; 2016-06-05
          [match] =&gt; 1
      )
  )
  </code></pre>
  
  <p>Is there any php codeigniter code for this? feel free to check my code here <a href="https://eval.in/599473" rel="nofollow">https://eval.in/599473</a></p>
  
  <p>Thanks!</p>