I have an array of the following:
function example() {
/* some stuff here that pushes items with
dynamically created key strings into an array */
return array( // now lets pretend it returns the created array
'firstStringName' => $whatEver,
'secondStringName' => $somethingElse
);
}
$arr = example();
// now I know that $arr contains $arr['firstStringName'];
In order to loop through array keys($arr) and return the key string "firstStringName" by its index, I need to get the index of $arr['firstStringName']. How can I go about doing that?