Sorting a multi-dimensional, non associative array in PHP : <p>So i've been looking throughout Stack Overflow looking for a solution for this problem. I have a multidimensional, non associative array in php and i want to sort it by one of its values, while maintaining the rest of the values within the same child array.</p>

<p>In the next example i want to sort the array by $fruits[This value][0].</p>

<p>This is what i have:</p>

<pre><code>$fruits = array
(
array(2, apple),
array(1, orange),
array(4, banana),
array(3, kiwi),
);
</code></pre>

<p>This is what im looking for:</p>

<pre><code>$fruits = array
(
array(1, orange),
array(2, apple),
array(3, kiwi),
array(4, banana),
);
</code></pre>

<p>This is what i dont want:</p>

<pre><code>$fruits = array
(
array(1, apple),
array(2, orange),
array(3, banana),
array(4, kiwi),
);
</code></pre>

<p>Thanks in advanced!</p>
