how to relate array of textfields with array of list

cnicolaide

New Member
Friends i have a form with number of list and text fields.each table row has a list and a textfield.you can select a option from the list and add content to its related textfield.As follows,\[code\]<tr><td><select name="area[]"><option>Family</option><option>Love</option><option>Marriage</option></select></td><td><input type="text" name="content[]"></td></tr>\[/code\]As there can be any number of rows i decided to get inputs as arrays and try to use foreach() with those records.my loop is something like this\[code\]<?php if(!empty($_POST['content'])){ foreach($_POST['content']as $value){ //need to get the related list value here } }?>\[/code\]What my problem is i can get the textfield value but how i get the related list value from my list array?Sorry for my bad English.Hope you will advise me on thisThanks.
 
Back
Top