Reverse an array in php without using the reverse function

<?php
  $array = array(1, 2, 3, 4);
  $size = sizeof($array);

  for($i=$size-1; $i>=0; $i--){
      echo $array[$i];
  }
?>

Comments

Popular posts from this blog

Stop video playing when Bootstrap modal is closed