Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <p>
- <?php
- // Create an array with several elements in it,
- // then sort it and print the joined elements to the screen
- $the_array = array(1, 2, 3 ,4);
- sort($the_array);
- print join(", ", $the_array);
- ?>
- </p>
- <p>
- <?php
- // Reverse sort your array and print the joined elements to the screen
- rsort($the_array);
- print join(", ", $the_array);
- ?>
- </p>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement