Return the element key from the current internal pointer position:


SUBMITTED BY: henry1874w

DATE: June 26, 2017, 5:25 p.m.

FORMAT: Text only

SIZE: 123 Bytes

HITS: 897

  1. <?php
  2. $people=array("Peter","Joe","Glenn","Cleveland");
  3. echo "The key from the current position is: " . key($people);
  4. ?>

comments powered by Disqus