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