Which function would you use to rearrange the contents of the following array so that they are reversed (i.e.: array ('d', 'c', 'b', 'a') as the final result)? (Choose 2)
$array = array ('a', 'b', 'c', 'd');
[6261,6263]
Correct:
--> array_reverse()
--> rsort()
Despite its name, array_flip() only swaps each element of an array with its key. Both rsort() and array_reverse() would have the effect of reordering the array so that it contents would read ('d', 'c', 'b', 'a'). Therefore, the correct answers are B and D.