<?php $r="../../";
require_once($r."inc/funciones.php");
$mysqli = connectDB($r);
$code = $_POST["code"];
$sqlpago = $mysqli->query("SELECT * FROM `z_pagos` WHERE idpedido = $code"); ?>
<table class="table">
    <thead>
    <tr>
      <th scope="col">Medio</th>
      <th scope="col">Monto</th>
    </tr>
  </thead>
<? while($row1 = $sqlpago->fetch_assoc()){ ?>
  <tr><td><?= sinfo('z_pagos_medios',$row1['idmedio'])['medio']; ?></td><td><?= moneda($row1['monto']); ?></td></tr>
<? } ?>
</table>