php - Accessing Parent Array Names -
i have got app returning array: http://pastebin.com/3vkcjlmt
i'm trying list data on laravel view as:
fab0003 - accessory stand short section -- mac0010 -- cut0010 fab0004 - accessory stand long section -- mac0011 -- raw0010
but can't life of me figure out how access pieces of information beginning fab! current view code this:
@foreach ($product->fabrications $items) @foreach ($items $item) <tr> <td></td> <td>{{ $item->part_number }}</td> </tr> @endforeach @endforeach
i grateful if out php noob has wasted hours on :(
try -
@foreach ($product->fabrications $key => $items)
$key
parent key.
note : should array key.
Comments
Post a Comment