Here is a problem I'm having with a variation on the standard shopping cart model (I'm a newbie to arrays, so humor me a bit):
I have a list of 20 items. Each has a checkbox that is off by default, and a text field that is 1 by default for quantity. If the user wants the item, they simply check the box and modify the quantity text field if desired.
Example:
<input type='checkbox' name='items[]' value='$Item_Code'>
<input type='text' size='2' name='quantity[]' value='1'>
On the page that I post this info to, I count through the array. However, items[5] is not the same row as quantity[5]. I know this is because only the marked checkboxes become part of the items array, while all of the text fields are added to the quantity array...but I'm not sure how else to go about this. Help!?