Return the element key from the current internal pointer position:
The key() function returns the element key from the current internal pointer position.
This function returns FALSE on error.
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the key of the array element that is currently being pointed to by the internal pointer |
---|---|
PHP Version: | 4+ |