Get the name of an index in an array
php
Solution
Assuming that you haven't used `each()`, `next()`, `prev()` or in any other manner have you advanced the array pointer:
key($array);
Problem
Possible Duplicate: Get first key in a [possibly] associative array? I have this array: ``` Array ( ['foobar'] => Array ( [key1] => value1 [key2] => value2 ) ) ``` I want to get to name of the first index (foobar). How can I do it?