</td>
                        <td><?php 
    echo $mp['unidad'];
    ?>
</td>
                        <td class="der resaltar"><?php 
    echo $pm['cantidad'] * $dat['cantidad'];
    ?>
</td>
                        </tr>
                    <?php 
}
?>
                </table>
                <?php 
$proet = $productoetapa->mostrarTodoRegistro("codproducto=" . $dat['codproducto']);
$totaletapas = count($proet);
$pedet = $pedidoetapa->mostrarTodoRegistro("codpedidodetalle=" . $dat['codpedidodetalle']);
$etapasrealizadas = count($pedet);
$porcentaje = $etapasrealizadas * 100 / $totaletapas;
$porcentaje = round($porcentaje, 2);
?>
                <a name="etapa"></a>
                <table class="table table-bordered table-striped table-hover tablanoancha enlinea">
                <thead>
                    <tr><th colspan="3">Etapas</th></tr>
                </thead>
                    <tr>
                        <td class="resaltar der" colspan="3">
                        <div class="progress progress-striped active" style="margin-bottom:5px;">
                            <div class="bar" style="width: <?php 
示例#2
0
<?php

include_once "../../class/productoetapa.php";
$productoetapa = new productoetapa();
extract($_POST);
$dat = $productoetapa->mostrarTodoRegistro(" codproducto LIKE '{$codproducto}'", 1, "");
include_once "../../class/etapa.php";
$etapa = new etapa();
?>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr><th width="50">Nº</th><th>Código</th><th>Nombre</th></tr>
</thead>
<?php 
foreach ($dat as $d) {
    $i++;
    $et = $etapa->mostrarTodoRegistro("codetapa=" . $d['codetapa']);
    $et = array_shift($et);
    ?>
<tr>
    <td class="der"><?php 
    echo $i;
    ?>
</td>
    <td><?php 
    echo $et['codigo'];
    ?>
</td>
    <td><?php 
    echo $et['nombre'];
    ?>