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-key-last-function |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India