If you want to go by "position" in the array you can do two (and a half) things:
a) advance the pointer in a for() loop using next() (use reset() to be sure the pointer is at the start - foreach() works as well as it advances the pointer each pass - just count inside the foreach loop
b) use array_keys($myArr) to get an array containing all the keys of $myArr as a numerically indexed array an then work from there.
However: The question would be in that case: why did you get an associative array in the first place?
To conclude this rather hypothetical input: most likely dagon nailed it: use array_search
Bjom