[ create a new paste ] login | about

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

upwhere - PHP, pasted on Jan 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
 
$gift = array("TV","car","aeroplane", "iPad", "iPhone", "PS4"); 

echo "Before Sorting:\n";
echo "$gift[0] $gift[1] $gift[2] $gift[3] $gift[4] $gift[5]";


sort($gift);
echo "\n\n";
echo "After sorting:\n";
echo "$gift[0] $gift[1] $gift[2] $gift[3] $gift[4] $gift[5]";


?>


Output:
1
2
3
4
5
Before Sorting:
TV car aeroplane iPad iPhone PS4

After sorting:
PS4 TV aeroplane car iPad iPhone


Create a new paste based on this one


Comments: