I am trying to move a webapp CRUD solution created outside a framework,
and now move it inside of Laravel. Below you see the section "standard PHP" which is a code that works, and the "Laravel that does not work.
Question: How do I write nested foreach loops in Laravel as identical as the one written in standard PHP example ?
Laravel
<table>
<!-- https://laravel.com/docs/5.7/blade#loops -->
@foreach ($response_body as $key => $value)
@foreach ($value as $level2data => $array)
<tr>
<td>
Hello
</td>
</tr>
@endforeach
@endforeach
</table>
Result of laravel code (printout on browser):
@foreach ($response_body as => $value)
@foreach ($value as $level2data => array)
@endforeach
@endforeach
Hello
Standard PHP
<table>
<?php foreach ($response_body as $key => $value):?>
<?php foreach ($value as $level2data => $array):?>
<tr>
<td id="email">
<?php echo "hello" . "\r\n"; ?>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</table>