numeric sort a mixed types values array by sort() php function
<p>i have a mixed array like this:</p>

<pre><code>$fruits = array("lemon","Lemon", 20, "banana", "apple","121",40,50);
</code></pre>

<p>and then apply sort() function to it as follows:</p>

<pre><code>sort($fruits,SORT_NUMERIC);
foreach ($fruits as $key =&gt; $val) {
    echo "fruits[" . $key . "] = " . $val . "\n";
}
</code></pre>

<p>now, i do not understand the output that is :</p>

<pre><code>fruits[0] = apple
fruits[1] = lemon
fruits[2] = banana
fruits[3] = Lemon
fruits[4] = 20
fruits[5] = 40
fruits[6] = 50
fruits[7] = 121
</code></pre>

<p>please explain the way that is sorted</p>
