<?php
$arr=array("car","scooter","motorcycle","truck","cycle");
echo "array values
are<br>";
foreach ($arr as $a)
echo " ".$a;
echo "<br>array
values after reversing are <br>";
$arr1=array_reverse($arr);
foreach ($arr1 as $a)
echo " ".$a;
?>
Output
array values are
car scooter motorcycle truck cycle
array values after reversing are
cycle truck motorcycle scooter car
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.