php key() function


Translation results:

UK[ki:] US[ki]

n.Key; (of a typewriter, etc.) key; key, clue, secret; (of music) key

vt.Type; Lock; adjust the tone of...; provide clues

vi. Use keys

adj. Critical; main

Third person singular: keys Plural: keys Present participle: keying past tense: keyed past participle: keyed

php key() functionsyntax

Function:Returns the key name of the element currently pointed to by the internal pointer of the array.

Syntax:key(array)

Parameters:

Parameter Description
array Required. Specifies the array to use.

Description:Returns the key name of the element currently pointed to by the internal pointer of the array. If an error occurs, the function returns FALSE.

php key() functionexample


Run instance»

Click the "Run instance" button to view the online instance

Output:

键的当前位置是:0



Run Instance»

Click the "Run Instance" button to view the online instance

Output:

1

Popular Recommendations

Home

Videos

Q&A