i want to acces the id from level_1
my array looks like this:
Array
(
[id] => 85
[id_world] => 1
[key] => b_main
[level] => 0
[created_at] => -0001-11-30 00:00:00
[updated_at] => -0001-11-30 00:00:00
[level_1] => Array
(
[id] => 9
[key] => b_main
[created_at] => -0001-11-30 00:00:00
[updated_at] => -0001-11-30 00:00:00
)
[level_2] => Array
(
[id] => 10
[key] => b_main
[created_at] => -0001-11-30 00:00:00
[updated_at] => -0001-11-30 00:00:00
)
[level_3] => Array
(
[id] => 11
[key] => b_main
[created_at] => -0001-11-30 00:00:00
[updated_at] => -0001-11-30 00:00:00
)
)
my foreach looks like this (b is the array above):
@foreach ($a $b)
{{ "<pre>"; print_r($b); echo "</pre>"; }}
<tr>
<th>
{{{ $b['key'] }}}
</th>
<td>
adsasd
</td>
<td>
@{{ $b['level_1']['id'] }}
</td>
<td>
adsasd
</td>
</tr>
@endforeach
the error i got:
Undefined index: level_1 (View: /var/www/core/app/views/asd/index.blade.php)
so, how i can acces my id on level_1?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community