PHP key() functionThe key( ) function returns the element key from the current internal pointer position. This function was introduced in 4.0. SyntaxParameter
ReturnsThe key( ) returns the key of the array element that is currently being pointed by the internal pointer. Example 1Output: The key from the current position is: 0 Example 2Output: Current position Key is : Subject1 Example 3Output: Current position Key is :tata Example 4Output: The key from the current position is: 0
Next TopicPHP Array Functions
|