title: How to loop through dynamic form inputs and insert into an array
body: <p>I have a form that asks users to input numbers into multiple form fields. They can select how many form fields they would like. I have labelled the form fields as df1, df2, df3 etc. For each extra form field the user adds it will simply plus 1 to the number after df. My problem it trying to capture (using PHP) these fields and put them in an array. To complicate matters the user might not complete a field, e.g. df2 or df15. I am looking for a way to sort through the post form fields that start df1 but eliminate any fields that have been left blank. Then, insert their values (numbers) into an array. Unfortunately, I am getting confused as to how to screen out the posted form fields that are NULL. I have been trying to loop through the fields and increment the number after df but without success. </p>
  
  <p>Any help would be very much appreciated.</p>
  
  <p>Many thanks,</p>
  
  <p>Adam</p>