首页 > 解决方案 > 在 1 个表 codeigniter 中添加 2 个历史记录

问题描述

我有这个HTML显示历史的表,我像这样显示数据

我的控制器:

$data['cashoutrequest'] = $this->investor->getCashoutRequest($this->session->userdata('refcode'));
$data['investHistory'] = $this->investor->account_history($this->session->userdata('refcode'));

我的观点:

<?php if($cashoutrequest != null) {?>
                    <?php $i=1;foreach($cashoutrequest as $rec): ?>
                    <?php foreach($investHistory as $rec2): ?>
                    <tr>
                        <td><?php echo $rec['referal_code']; ?></td>
                        <td><?php echo $rec['activity']; ?></td>
                        <td><?php echo $rec['description']; ?></td>
                        <td><?php echo $rec['date']; ?></td>
                        <?php if($rec['status'] == 0) { echo "<td>pending</td>"; } else { echo "<td>confirmed</td>"; } ?>

                    </tr>
                    <?php endforeach; ?>
                    <?php endforeach;?>
                    <?php } ?>

我还想显示一些有关投资历史的数据,但它不起作用。它什么也不显示。

标签: phpcodeigniter

解决方案


推荐阅读