title: Sort an array (looking a specific value) based on another array
body: <p>I have this array of options, and some value of an internal array is the "ID"</p>
  
  <pre><code>[options] =&gt; Array (
      [0] =&gt; Array (
          [id] =&gt; 1088
          [label] =&gt; John
      )
      [1] =&gt; Array (
          [id] =&gt; 1089
          [label] =&gt; Peter
      )
      [2] =&gt; Array (
          [id] =&gt; 1050
          [label] =&gt; Mary
      )
      ....
  </code></pre>
  
  <p>On the other hand, I have this array:</p>
  
  <pre><code>$array_sort = array(1089, 1050, 1088, ...);
  </code></pre>
  
  <p>I would like the options array of the first array is sorted (looking the "id") based on the <code>$array_sort</code>.</p>
  
  <p>I know how to do it in a very dirty way (with a lot of loops and temporary arrays), but I guess there's some smart solution of array_* functions to do this. </p>
  
  <p>Thank you !</p>