Easy Tutorial
❮ Php Is_String Function Php Tutorial ❯

PHP key() Function

Complete PHP Array Reference Manual

Example

Returns the key of the element at the current internal pointer position:


Definition and Usage

The key() function returns the key of the element at the current internal pointer position.

If an error occurs, the function returns FALSE.


Syntax

Parameter Description
array Required. Specifies the array to use.

Technical Details

Return Value: Returns the key of the array element currently pointed to by the internal pointer.
PHP Version: 4+
--- ---
❮ Php Is_String Function Php Tutorial ❯