Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wahidsherief's avatar

2d array print in laravel blade

Hi , I am facing a problem, i just can't print a 2d array in my laravel blade organizing in row column. I generate the array in controller and pass it to blade, i did var_dump and everything is ok. but when i want to print array value it says, Array to string conversion. this is the last try i made :

@foreach($data as $d) {{ (isset($d[0]) ? $d[0]['id'] : '') }} @endforeach

pls help me out .. in this regard .

0 likes
4 replies
wahidsherief's avatar

Thanks taijuten but no luck :( i tried in many ways but two d array is not echoing .. :(

Please or to participate in this conversation.