Hi
Put the element you want to have an array inside the loop and also initialize one variable and increment it inside your loop.Like this.
$i=0;
while(condition)
{
//Name the form element like this
<input type=..... name=name<?echo($i)?>>
$i++;
}
Now you will be having the total number of variables in $i and create one hidden variable.
<input type="hidden" name=ctr value=<?echo($i)?>
Now our work in page2
create one for loop and assign the value for each variable. Like this.
for($j=0;$j<$ctr;$j++)
{
$temp="name".$i;
$temp1=${$temp};
//Here you will get all the elements one by one and it will be in $temp1.You can check the content of each value by printing $temp1.
print($i."value =".$temp1);
}
Since we are assigning the element name dynamically it will work for 'N' number of elements(may be fetched from database).
Hope this will give some idea.
srini