Fetching the array data and using explode i have separated the content. Now, i want to print those data in the list. But products are printing in the line. I tried using "break tag" And "list tag" Every possible ways.
Here is the code
<tbody id="test">
@foreach ($data['samplingData'] as $key => $samplingData)
<tr> <td></td>
<td></td>
@foreach(explode(',', $samplingData->products) as $product)
<td> </td>
@endforeach
<td></td> </tr>
@endforeach
</tbody>
Data is printing in this way
Name date products quantity
a 12-12-12 a a a a 1 1 1 1
I want to print like this
Name date products quantity
a 12-12-12 a 1
a 1
a 1
I tried adding tr inside td and as well as list inside the td.
Please help me in formatting the data.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire