i think it is considered as a seperate cookie for each iteration.
so you will run off the cookie amount limits pretty soon.
an easy solution i use is:
when i set cookie, i walk through the array and save values of all the items in one string, separate by special characters such as ":::"
say if i have a quantity[], i will loop the array and get the cookie value as
$quantity_cookie=$quantity_cookie.":::".$quantity[$index];
and save this cookie $quantity_cookie, which will considered as one cookie.
and when i use it
i will use
list ($quantity)=array(split(":::", $quantity_cookie));
to get my $quantity[] back
hui