seems like your kind of limited with pointers..
why not use something like this:
PHP Code:
<?
for ($i=0; $i < count($array); $i++)
{
$imageArray[$i];
}
?>
then $i is always your current position.. i'm not sure i understand fully what you're using the pointer for though.