I thought it was an issue with CSS so I have tried overflow:auto
, text-overflow:ellipsis
and display:flex
in td
Here is my HTML
JavaScript
x
<div class="box" style="overflow-x: auto; height: 90%">
<div class="box-body">
<table id="applicant_table" class="table table-bordered table-striped">
<tbody>
<?php foreach($app_array as arr) { ?>
<tr>
"<td>" echo $arr->coverletter "</td>"
<?php
}
?>
</tr>
</tbody>
</table>
</div>
</div>
How can I display the whole content of my array?
Advertisement
Answer
I think your problem is when you are iterating over the array. You should put the foreach before <tr>
, as following below:
JavaScript
<table id="applicant_table" class="table table-bordered table-striped">
<tbody>
<?php foreach($app_array as arr) { ?>
<tr>
<td> <?php echo $arr->coverletter ?></td>
</tr>
<?php } ?>
</tbody>
</table>