I have a view in which I have to execute foreach loops. The problem is that I want to get one input from first foreach then get the other input from the second foreach. I have an outer for loop which will execute until all the foreach is exhausted.
@for($i=0;$i<=$n;$i++)
<tr>
<th scope="row">{{$i}}</th>
@foreach($Names as $Name)&&
<td>{{$Name}}</td>
@endforeach
@foreach($users as $user)
<td>{{$user}}</td>
@endforeach
@endfor