Sort multidimensional array according to sub index
<p>I have an array items following.</p>

<pre><code>Array
(
    [0] =&gt; Array
        (
            [0] =&gt; 2
            [field_id] =&gt; 2
            [1] =&gt; Photometric Interpretation
            [title] =&gt; Photometric Interpretation
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [1] =&gt; Array
        (
            [0] =&gt; 3
            [field_id] =&gt; 3
            [1] =&gt; Make
            [title] =&gt; Make
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [2] =&gt; Array
        (
            [0] =&gt; 4
            [field_id] =&gt; 4
            [1] =&gt; Model
            [title] =&gt; Model
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [3] =&gt; Array
        (
            [0] =&gt; 5
            [field_id] =&gt; 5
            [1] =&gt; Strip Offsets
            [title] =&gt; Strip Offsets
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [4] =&gt; Array
        (
            [0] =&gt; 6
            [field_id] =&gt; 6
            [1] =&gt; Samples Per Pixel
            [title] =&gt; Samples Per Pixel
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [5] =&gt; Array
        (
            [0] =&gt; 7
            [field_id] =&gt; 7
            [1] =&gt; Rows Per Strip
            [title] =&gt; Rows Per Strip
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [6] =&gt; Array
        (
            [0] =&gt; 8
            [field_id] =&gt; 8
            [1] =&gt; Software
            [title] =&gt; Software
            [2] =&gt; text
            [field_type] =&gt; text
        )

    [7] =&gt; Array
        (
            [0] =&gt; 9
            [field_id] =&gt; 9
            [1] =&gt; Exposure Time
            [title] =&gt; Exposure Time
            [2] =&gt; text
            [field_type] =&gt; text
        )
)
</code></pre>

<p>I need to sort above array's <code>field_id</code> INDEX according to this following array's VALUE</p>

<pre><code>Array
(
    [0] =&gt; 7
    [1] =&gt; 3
    [2] =&gt; 4
    [3] =&gt; 5
    [4] =&gt; 2
    [5] =&gt; 6
)
</code></pre>

<p>OR to following string</p>

<pre><code>7,3,4,5,2,6
</code></pre>

<p>I have tried to sort array using <code>uksort()</code> and <code>uasort()</code>.</p>