here is my html table code which contains php foreach loop for fillig the html table data, i want to post this whole table data to my controller as a array by form.serialize in ajax, can i do this??how??
<table class="table table-striped table-vcenter table-bordered">
<thead>
<th>Master Name</th>
<th>From No.</th>
<th>To No.</th>
<th>Total</th>
</thead>
<tbody>
<?php foreach ($master as $name) { ?>
<tr class="rc1_tr">
<td class="td_amount"><div id="amount"><?php echo $name['amount']; ?></div></td>
<td id="form_no"><div id="div_to_no"><?php echo $name['receipt_no_to'] ? $name['receipt_no_to'] : '0'; ?></div></td>
<td align='center' class="qt" id="<?php echo $name['id'] ?>" style="width: 250px;"><input type="text" id="to_no" class="quantity" value="" style="text-align:center;width:180px;height:26px;margin-bottom: 2px;"/></td>
<td id="td_total"><div id="total"></div></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr class="grand_total">
<td colspan="3">Grand Total</td>
<td><div id="div_grand_total"></div></td>
</tr>
</tfoot>
</table>