# php array, textbox id



## cyberpac9 (May 25, 2005)

here is the concept: i have several textboxes on a form where people can enter a quantity. the submitted form will be emailed to a person. i only want to send those items that actually had a value >0 to be included in the email.

so, what i have done is for all the textboxes (let's say 20 of them) i have the name setup like this: name="txtName[]". thus creating an array for all textboxes. first of all, is this the best way to create the array?

the id value for each textbox will be different, identifying what the field is linked to: id="item_1_value_a", id="item_1_value_b", id="item_1_value_c", id="item_2_value_a", id="item_2_value_b" and so on. what i'd like to be able to do is echo the id value for the email. let's say in the first textbox (id="item_1_value_a") the person enters 4. i'd like to echo this out in the email so that it says "4 item_1_value_a" so that the recipient will know that the 4 is linked to the textbox item_1_value_a. is this possible? or is there another way?


----------



## cyberpac9 (May 25, 2005)

nobody has any comments on arrays....hmmmm


----------

