在PHP中,可以使用array_reverse()
函数来将数组倒序输出。示例如下:
$fruits = array("apple", "banana", "cherry", "date");
$reversed_fruits = array_reverse($fruits);
print_r($reversed_fruits);
输出结果将是:
Array
(
[0] => date
[1] => cherry
[2] => banana
[3] => apple
)