The following will help you.
<?php foreach($rows as $row) : ?>
<tr>
<?php foreach($row as $key=>$value) : ?>
<td><?php echo $row->$key; ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>