<table id="tbl_benefit" class="table table-bordered table-sm table-responsive-sm tbl-th-grey-bg">
	<thead>
		<tr>
			<th>Benefit</th>
			<?php if($action=="add"){ ?>
			<th width="50px" class="text-center">#</th>
			<?php } ?>
		</tr>
	</thead>
	<tbody>
<?php 	
	$no_of_rows = 1;
	if($acObj->request->getPost('pb_name')){
		$no_of_rows = count($acObj->request->getPost('pb_name'));
	}else if(isset($borrower_list)){
		$no_of_rows = count($borrower_list);		
	}
	for($i=0; $i < $no_of_rows; $i++){
		echo view('admin/product_benefit_detail_row',['i'=>$i,'borrower'=>($borrower_list[$i] ?? [])]);
	}
?>
	</tbody>
</table>
<?php if($action=="add"){ ?>
<div class="clearfix">
	<p id="add_benefit_btn_container" class="float-right font-weight-boldest text-uppercase mb-0"><a href="javascript:void(0);" onclick="addBenefitDetailRow();">Add More</a></p>
</div>	
<?php } ?>