Return the original array, the reversed array and the preserved array:


SUBMITTED BY: henry1874w

DATE: June 25, 2017, 2:47 p.m.

FORMAT: Text only

SIZE: 179 Bytes

HITS: 282

  1. <?php
  2. $a=array("Volvo","XC90",array("BMW","Toyota"));
  3. $reverse=array_reverse($a);
  4. $preserve=array_reverse($a,true);
  5. print_r($a);
  6. print_r($reverse);
  7. print_r($preserve);
  8. ?>

comments powered by Disqus