You can directly access a array over its key
PHP Code:
$test = array();
$test[0] = 2;
$test[1] = 3;
$test[2] = 4;
// accessing the second array element
echo $test[0];
If you do not use sequential index based keys try this:
PHP Code:
$test = array();
$test['a'] = 2;
$test['b'] = 3;
$test['c'] = 4;
// store the array keys of $test in a numerical indexed
// array
$keys = array_keys($test);
// access second element
echo $test[$keys[1]];
A final solution would be to use some loop and move the internal array pointer: (assuming that $a holds the info from your GET variable)
PHP Code:
$i = 0;
while ($i++ < $a) { next($test); }
// maybe necessary to use prev($test) after the loop
Bookmarks