PHP array 反轉陣列排列順序

12 月 20, 2016 | | 0 comments

$a=array(‘a’,’1′,’2′,’b’);
print_r(array_reverse($a));

顯示結果:
Array ( [0] => b [1] => 2 [2] => 1 [3] => a )