Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Output the value of the current, next and previous element in the array:
SUBMITTED BY:
henry1874w
DATE:
June 27, 2017, 5:11 p.m.
FORMAT:
Text only
SIZE:
151 Bytes
Raw
Download
Tweet
HITS:
429
Go to comments
Report
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");
echo current($people) . "<br>";
echo next($people) . "<br>";
echo prev($people);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus