Stupid sort
Simple sorting algorithm, but effective only for very small arrays. Complexity 
<?php
function stupidSort(&$Array)
{
$i = 0;
$n = count($Array);
while ($i < $n - 1)
{
if ($Array[$i+1] < $Array[$i])
{
list($Array[$i], $Array[$i+1]) = array($Array[$i+1], $Array[$i]);
$i = 0;
}
else $i++;
}
}