I have an array called reverse array and I want to reverse it.
This is my code:
<?php
//Task 21 reverse array
$reverseArray = array(1, 2, 3, 4);
$tmpArray = array();
$arraySize = sizeof($reverseArray);
for($i<arraySize; $i=0; $i--){
echo $reverseArray($i);
}
?>
I want to know how to reverse an array without using the array_reverse method. Can someone please point out the mistake in my code?