======array_key====== WMPRO, WMMINI FW >= 1.953 WMMEGA FW >= 2.0 Return the key for an array index ====Description==== string array_key ( array $array, int $index ) ====Parameters==== $array: An array with key/value pairs $index: The index for the array element (the first element is index 0) ====Return Values==== String containing the key name of the array element at the specified index ====Example==== ===Create an array with key value pairs, iterate through the array, print out all keys and their associated values===
The above example will output: Key at Index 0 is name and value is John Key at Index 1 is age and value is 30 Key at Index 2 is status and value is 1 ====See Also==== [[array()]] - Create an array, with optional values [[array_keys()]] - Return keys for an array that has key/value pairs [[sizeof()]] - Return the number of elements in an array [[print_r()]] - Dump the contents of an array to the current output [[uphp:variables|uPHP Variable Types and Limits]]