Q. What will the following code print?
Code:<?php $array = [1, 2, 3]; print_r(array_reverse($array)); ?>
β
Correct Answer: (A)
Array ( [0] => 3 [1] => 2 [2] => 1 )
Explanation: array_reverse() returns the elements of an array in reverse order.