sorting array value without using built in php like sort() etc
<pre><code>&lt;?php
function sortArray() {
    $inputArray = array(8, 2, 7, 4, 5);
    $outArray = array();
    for($x=1; $x&lt;=100; $x++) {
        if (in_array($x, $inputArray)) {
            array_push($outArray, $x);
        }
    }
    return $outArray;
}


$sortArray = sortArray();
foreach ($sortArray as $value) {
    echo $value . "&lt;br /&gt;";
}
?&gt;
</code></pre>

<p>I have this code but there are two problems</p>

<ul>
<li>What if my numbers in array are greater than 100?</li>
<li>Also, I'd like to see more than one method of sorting</li>
</ul>
