Hi I have an array $months which holds the months of the year. I have a funcion echoArray($theArray) which contains a for loop to print out the months as month 1 is January, month 2 is February etc. I now have to create another function reverseArray which will output the months as month 1 is December, month 2 is November etc. However it states not to use the array_reverse() function or any of its aliases. Just wondering if anyone could tell me how to do this, the only way i knew how to reverse an array was the reverseArray() function.
This is the code i have for the echoArray($theArray) function.
function echoArray($theArray)
{
$size=count($theArray);
for ($i=0; $i<=$size-1; $i++)
echo "month number " . ($i+1) . " is :" .$theArray[$i] . "<br />";
}