Return the element key from the current internal pointer position in PHP
Description
The following code shows how to return the element key from the current internal pointer position.
Example
//from w w w. j a va2 s. c om
<?php
$people=array("XML","CSS","HTML","Javascript");
echo "The key from the current position is: " . key($people);
?>
The code above generates the following result.