foreach ($query as $q ): $include_var .= "<tr><td>".$q->coin."</td><td>".$q->bank."</td><td>".$q->cours."</td></tr>"; $str = "<table class='table'<thead><tr><th> Title </th><th>Content</th><th>Date</th></tr></thead><tbody>".$include_var."</tbody></table>"; endforeach;
foreach ($query as $q ):
$include_var .= "<tr><td>".$q->coin."</td><td>".$q->bank."</td><td>".$q->cours."</td></tr>";
endforeach;
$str = "<table class='table'<thead><tr><th> Title </th><th>Content</th><th>Date</th></tr></thead><tbody>".$include_var."</tbody></table>";
$include_var = "";
foreach ($query as $q ){
$include_var .= "<tr><td>".$q->coin."</td><td>".$q->bank."</td><td>".$q->cours."</td></tr>";
}
<table>
<?php foreach($arr as $el): ?>
<tr>
<td><?php echo $el['столбец_1']; ?></td>
<td><?php echo $el['столбец_2']; ?></td>
....
</tr>
<?php endforeach; ?>
</table>
<script>
, который может уже что-то делать.