You can do it as follows:
function asoccArrayValueWithNumKey(&$arr, $key) { if (!(count($arr) > $key)) return false; reset($array); $aux = -1; $found = false; while (($auxKey = key($array)) && !$found) { $aux++; $found = ($aux == $key); } if ($found) return $array[$auxKey]; else return false; } $val = asoccArrayValueWithNumKey($array, 0); $val = asoccArrayValueWithNumKey($array, 1); etc...
I haven't tried the code, but I'm sure it will work.
Good luck
Nicolas Nov 04 '10 at 12:27 2010-11-04 12:27
source share