echo "<tr>"; echo "<td>".$intable["id"]."</td>"; echo "<td>".$key."</td>"; echo "<td>$ ".$intable['price']."</td>"; echo '<td>'.$_SESSION["bAmount".$a].'</td>'; echo '<td>'.$_SESSION["bAmount".$a]*$intable["price"].'</td>'; echo '<td>'.$_SESSION["bAmount".$a]*$intable["price"]*1.07.'</td>'; echo "</tr>"; $a = $a + 1; }*/ ?> <tr> <td colspan="6"> <?php total_bill($product, $bAmount); /* $j=1; foreach ($_SESSION["product"] as $key => $intable) { $pSum = $pSum + (((int)$_SESSION["bAmount".$j])*((int)$intable["price"])*1.07); $j = $j + 1; } echo "Total $ "; echo $pSum; echo " ";*/ ?> </td> </tr> </table>
$last_P[$i] = $get_A[$i] * $key['price'] * 1.07; echo "<tr>"; echo "<td>" . $key['product_code'] . "</td>"; echo "<td>" . $key['product_name'] . "</td>"; echo "<td>" . $key['price'] . "</td>"; echo "<td>" . $get_A[$i] . "</td>"; echo '<td>' . $get_A[$i] * $key['price'] . '</td>'; echo "<td>" . $last_P[$i] . "</td>"; echo "<tr>"; $i++; } ?> <tr> <td colspan="6"> <?php $total = total_bill($last_P); //total_bill($last_P); //total_bill($product,$bAmount); /* $j=1; foreach ($_SESSION["product"] as $key => $intable) { $pSum = $pSum + (((int)$_SESSION["bAmount".$j])*((int)$intable["price"])*1.07); $j = $j + 1; }*/ echo "Total \$ "; echo $total; echo " "; ?> </td> </tr>