lightyagami
4 months ago
242
1
Laravel

loop through a array and add values of first row of each array to table cells

Posted 4 months ago by lightyagami

i'm building a table where the first cell of each row is a "header" , a vertical table, like this one: https://jsfiddle.net/s1uy30v7/

i have a array like:

$collection = collect([
'months' => [
    'june' =>  [1222, 232323, 23423],
    'july' => [32323, 32313, 32333],
],
'total' => [323332, 3233, 43242] 
]);

how i can loop it and render in the right way in my table

Please sign in or create an account to participate in this conversation.