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

Creating Protected routes in ReactJS

Redirect http to https in codeigniter