foreach
loop iterates over a normal array value and sets the variable VAR
to be each element of the array in turn. The variable is implicitly local to the loop, and regains its former value upon exiting the loop.
keys
returns a normal array consisting of all the keys of the named associative array.
The keys are returned in a random order.