I have array:
$array = [
'category1' => [
'product33',
'product41'
],
'category2' => [
'product1',
'product45'
],
'category3' => [
'product65',
'product23',
'product423'
],
];
How can I show this data from array in table from top to bottom?
This should looks this:
category1 | category 2 | category3
product33 | product1 | product65
product41 | product45 | product23
| | product423
I tried:
<table>
<tr>
<?php foreach ($array as $category): ?>
<td><?php echo $category ?></td>
<?php endforeach ?>
</tr>
//????
</table>