陣列反向排序
宣告一個陣列(5,8,2,3,7,6,9,1,4,8,3,0),然後以顛倒的順序將前六項整數輸出

輸出結果:
Array ( [0] => 5 [1] => 8 [2] => 2 [3] => 3 [4] => 7 [5] => 5 [6] => 9 [7] => 1 [8] => 4 [9] => 8 [10] => 3 [11] => 0 )
[0]=>0
[1]=>3
[2]=>8
[3]=>4
[4]=>1
[5]=>9

輸出結果:
Array ( [0] => 5 [1] => 8 [2] => 2 [3] => 3 [4] => 7 [5] => 5 [6] => 9 [7] => 1 [8] => 4 [9] => 8 [10] => 3 [11] => 0 )
[0]=>0
[1]=>3
[2]=>8
[3]=>4
[4]=>1
[5]=>9
留言
張貼留言