Sorting Scalar Arrays in PHP

 

<?PHP

$numbers = array();

$numbers[ ]="2";
$numbers[ ]="8";
$numbers[ ]="10";
$numbers[ ]="6";

sort($numbers);

print $numbers[0] . " ";
print $numbers[1] . " ";
print $numbers[2] . " ";
print $numbers[3];

?>

<-- Back One Page | Move on to the Next Part -->

Back to the PHP Contents Page