echo $localidad->getValueEncoded("nombre"); echo "</td></tr>"; echo "<tr><th>Direccion</th><td>" . $_SESSION['direccion'] . "</td></tr>"; echo "<tr><th>Comensales</th><td>" . $_SESSION['comensales'] . "</td></tr>"; ?> <tr><th>PLATOS</th> <th></th> </tr> <?php $plato = $_SESSION['platos']; $Z = count($plato); for ($i = 0; $i < $Z; $i++) { $platos = Plato::getById($plato[$i]); echo "<tr><td>" . $platos->getValueEncoded("nombre") . "</td>"; echo "<td>" . $platos->getValueEncoded("precio") . "€</td></tr>"; $_SESSION['precio'] += $platos->getValueEncoded("precio"); } $_SESSION['precio'] *= $_SESSION['comensales']; echo "<tr><th>VINO</th>\n <th></th>\n\t\t\t\t</tr>"; $bebida = $_SESSION['bebidas']; $cantidad = $_SESSION['cantidad']; $bebidas = Bebida::getById($bebida); echo "<tr><th>Nombre</th><td>" . $bebidas->getValueEncoded("nombre") . "</td></tr>"; echo "<tr><th>Precio</th><td>" . $bebidas->getValueEncoded("precio") . "€</td></tr>"; echo "<tr><th>Cantidad</th><td>" . $cantidad . "</td></tr>"; $_SESSION['precio'] += $bebidas->getValueEncoded("precio") * $cantidad; echo "<tr><th>TOTAL</th>\n <th></th>\n\t\t\t\t</tr>"; echo "<tr><th>" . $_SESSION['precio'] . "€</th><td></td></tr>";