Output the value of the current and the next element in the array in PHP
Description
The following code shows how to output the value of the current and the next element in the array.
Example
/*from w w w. j a v a 2 s .c om*/
<?php
$people = array("XML", "CSS", "HTML", "Javascript");
echo current($people) . "<br>";
echo next($people);
?>
The code above generates the following result.