如何使用 Codeigniter 2.2.6 版本通过 multi-dimensional 数组在视图中显示 table 行

How display the table rows in view by multi-dimensional array using Codeigniter 2.2.6 version

如何通过在 codeignator 2.2.6 version 中插入或传递 multi-dimensional 数组在视图中显示 table 行。

我的模板(我的视图文件:)

<table>
<thead>
     <tr>
         <th>City</th>
         <th>Hotel</th>
     </tr>
 </thead>
 <tbody>
     <?php if((sizeof($result))>0){

        $array =  explode(',',$result->city);

            foreach($array as $info){
            ?>
                <tr>
                   <td><?php echo $info ;?></td>
                   <?php 
                    $arrays =  explode(',',$result->hotel_aboard);
                   foreach($arrays as $infos){?>
                   <td><?php echo $infos ;?></td>
                <?php } ?>
                 </tr>

            <?php
            } 

      }else{ ?>
            <tr><td colspan='3'>Data Not Found</td></tr>
       <?php } ?>
 </tbody>

</table>

输出: 我的输出显示如下所示,但我需要两列而不是第三列 geeting 输出双倍时间

大家好,我终于找到了解决方案,因为我已经努力工作了 5 天和几个小时,我一直是 link 跟着流程走

"https://eval.in/376541"