Php 在一个模式中创建一个foreach表,该模式称为form Other foreach表

Php 在一个模式中创建一个foreach表,该模式称为form Other foreach表,php,jquery,bootstrap-modal,Php,Jquery,Bootstrap Modal,我有一个带桌子的房间。我从foreach表加载模态。我相信我的代码是正确的,但我不知道为什么它会以一种有趣的方式显示。这是我的代码,当我运行这段代码时,这是我得到的结果 你能给我们一个截图,看看它应该是什么样子吗?点击代码看,它会带你到图片,已经上传到了@robeinbolocatacutan <tbody> <?php $count = 1; $notarray = DataDB::getInstance()->select_from_

我有一个带桌子的房间。我从foreach表加载模态。我相信我的代码是正确的,但我不知道为什么它会以一种有趣的方式显示。这是我的代码,当我运行这段代码时,这是我得到的结果



你能给我们一个截图,看看它应该是什么样子吗?点击代码看,它会带你到图片,已经上传到了@robeinbolocatacutan
<tbody>
   <?php
      $count = 1; 
      $notarray = DataDB::getInstance()->select_from_where('order_collective','user_id',$userid);
      foreach($notarray as $row):
      $address = $row['appartment'].",".$row['address'].",".$row['city'].",".$row['state'].".".$row['landmark'];
      ?>
   <tr>
      <td><?php echo $count++;?></td>
      <td><?php echo $row['trackingnumber'];?></td>
      <td><?php echo "NGN ".number_format($row['price'], 2);?></td>
      <td><?php echo $address;?></td>
      <td><?php echo $row['order_date'];?></td>
      <td><?php echo DataDB::getInstance()->get_name_from_id('name','delivery_status','delivery_status_id',$row['delivery_status']);?></td>
      <td>
         <div class="btn-group">
            <button type="button" class="btn btn-info" data-toggle="modal" data-target="#myVie<?php echo $row['trackingnumber'] ?>">View</button>
         </div>
      </td>
   </tr>
   <?php include ('order_history_modal.php'); ?>
   <?php endforeach;?>
</tbody>
<!-- order history modal code-->
<div id="myVie<?php echo $row['trackingnumber'] ?>" class="modal fade" role="dialog">
   <div class="modal-dialog">
      <!-- Modal content-->
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title">Modal Header</h4>
         </div>
         <div class="modal-body">
            <div class="table-responsive">
               <table class="table">
                  <thead>
                     <tr>
                        <th>Item</th>
                        <th>Quantity</th>
                        <th>Price</th>
                     </tr>
                  </thead>
                  <tbody>
                     <?php 
                        $notal = DataDB::getInstance()->select_from_where('order_details','trackingnumber',$row['trackingnumber']);             
                        foreach($notal as $rol):
                        $prrname = DataDB::getInstance()->get_name_from_id('product_name','product','product_id',$rol['product_id']);?>
                     <tr>
                        <td><?php echo $prrname ?></td>
                        <td><?php echo $rol['quantity'] ?></td>
                        <td><?php echo "NGN ".number_format($rol['price'], 2);?></td>
                     </tr>
                     <?php endforeach; ?>
                  </tbody>
               </table>
               <p></p>
            </div>
         </div>
         <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
         </div>
      </div>
   </div>
</div>