[ create a new paste ] login | about

Link: http://codepad.org/OXnf1zaQ    [ raw code | output | fork ]

PHP, pasted on Jul 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<p>
<?php
$the_array = array(5,3,7,1);
sort($the_array);
echo join(", ",$the_array);
?>
</p>
<p>
<?php
$the_array = array(5,3,7,1);
rsort($the_array);
echo join(", ",$the_array);
?>
</p>


Output:
1
2
3
4
<p>
1, 3, 5, 7</p>
<p>
7, 5, 3, 1</p>


Create a new paste based on this one


Comments: