The array_reverse() is used to reverse the array values.
Syntax:
array_reverse($array);
Program: array_reverse.php
<?php $words = $argv; echo "original\n"; print_r($words); echo "after reverse\n"; $words = array_reverse($words); print_r($words); ?>
Output:
Thanks for reading this post…………..!!!