HTML PHP form with multiple fields -


i have html form 5 rows , 30 fields. note attached image. image

i have capture of these fields in array later convert csv file. each field labelled @ follows: qt1, fa1, en1, et1, ba1, qt2, fa2, etc... instead of taking each row , adding them array in php 1 @ time there easy(ier) way accomplish this?

i can take each row , add them array issue feel speed of script , fact have write 30 lines of array data in php script.

is looking for?

<?php for($i = 0; $i < 30; $i++): ?>     <input name="qt[<?php echo $i; ?>]"/>     <input name="fa[<?php echo $i; ?>]"/>     <input name="en[<?php echo $i; ?>]"/>     <input name="et[<?php echo $i; ?>]"/>     <input name="ba[<?php echo $i; ?>]"/> <?php endfor; ?> 

on server side, receive data in $_post variable anyways, in array regardless. has advantage of saving values of same row same index , same data types under 1 array.

not sure performance, code readability , maintenance alot easier this.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -