How can I display data in a tablerow inside a foreach function? The agenda variable works fine, the rows variable is the one making problems, I need it inside a tag
<?php
$agenda = $days = json_decode(get_field( "field_uc_content_json" ));
unset($agenda[0]); ?>
<table class="table">
<thead>
<tr>
<th> Day </th>
<th>Description</th>
<th>Hours</th>
</tr>
</thead>
<tbody>
<?php foreach($agenda as $column) { ?>
<tr>
<td><?php echo $column[0]; ?></td>
<td><?php
$rows = explode( "\n", $column[1]);
foreach ($rows as $row) { ?>
<tr> <?php echo $row; ?> </tr>
<?php } ?>
</td>
</tbody>
</table>
The second foreach
vardump agenda
vardump rows


var_dump($agenda);andvar_dump($rows);? I'd like to know what's inside these arrays. So I can help you displaying the values. The whole code of your<tbody>would also be nice.<tbody>code?