Anyone know how to sorting array values from least to greatest. Here the code;
[PHP]function mulsort($a)
{
sort($a);
$c = count($a);
for($i = 0; $i < $c; $i++)
if (is_array($a[$i]))
mulsort($a[$i]);
}
$temp = array(5,4,1,3,2 );
$test = array();
$test = mulsort($temp);
for($i=0; $i<sizeof($test ); $i++)
{
echo $test[$i].'<br>';
}[/PHP]
[PHP]function mulsort($a)
{
sort($a);
$c = count($a);
for($i = 0; $i < $c; $i++)
if (is_array($a[$i]))
mulsort($a[$i]);
}
$temp = array(5,4,1,3,2 );
$test = array();
$test = mulsort($temp);
for($i=0; $i<sizeof($test ); $i++)
{
echo $test[$i].'<br>';
}[/PHP]
Comment