My html code is:
<table cellpadding="0" cellspacing="0" border="1" class="pro_code_table">
<tr>
<th colspan="12" class="pro_code_lable_with_data">Product Code Detailes</th>
</tr>
<tr>
<td class="table_val_data">Title</td>
@foreach($x as $k_x => $v_x)
<td class="table_val_data">{{ $v_x }}</td>
@endforeach
</tr>
<tr>
@foreach ($y as $k_y => $v_y)
<td class="table_val_data">{{ $v_y }}</td>
<?php $pro_code_count=count($pro_code);
//print_r($pro_code);
?>
@for($r = 1; $r <=sizeof($x); $r++)
<td>
<?php $i=1; ?>
@foreach($pro_code as $key=>$val)
@if($i % 2 != 0)
<input type="text" name="pro_code[]" value="{{ $val }}">
@else
<input type="text" name="pro_code[]" value="{{ $val }}">
@endif
@endforeach
<?php
$i++;
?>
</td>
@endfor
</tr>
@endforeach
</table>
In that i can loop data inside table, the X and Y axis looped correctly, but inside an <td>
datas are looped more then one time,
nw how can i stop the looping process
my o\p is looking like below
i want data like an below like that