<html>
<p>
<?php
// Create an array with several elements in it,
// then sort it and print the joined elements to the screen
$somearray = array(1,3,4,6,5,7,2);
sort($somearray);
print join(", ", $somearray);
?>
</p>
<p>
<?php
// Reverse sort your array and print the joined elements to the screen
rsort($somearray);
print join(", ", $somearray);
?>
</p>
</html>
No comments:
Post a Comment