Output the value of the current and the next element in the array:


SUBMITTED BY: henry1874w

DATE: June 27, 2017, 5:07 p.m.

FORMAT: Text only

SIZE: 121 Bytes

HITS: 376

  1. <?php
  2. $people = array("Peter", "Joe", "Glenn", "Cleveland");
  3. echo current($people) . "<br>";
  4. echo next($people);
  5. ?>

comments powered by Disqus