[Solved] I need help getting the grand total of a simple php cart using sessions [closed]


Just replace this chunk of code, with my code below….should work…

     <?php
    //Print all the items in the shopping cart
    $totalAll = 0;
    foreach ($_SESSION['SHOPPING_CART'] as $itemNumber => $item) {

    $totalAll = $totalAll + ($item['qty']*$item['price']);

    ?>
    <tr id="item<?php echo $itemNumber; ?>">    
        <td height="41"><a href="https://stackoverflow.com/questions/17129590/?remove=<?php echo $itemNumber; ?>">Remove Item</a></td>
        <td><?php echo $item['name']; ?></td>
        <td>£<?php echo $item['price']; ?></td>
        <td><input name="items_qty[<?php echo $itemNumber; ?>]" type="text" id="item<?php echo $itemNumber; ?>_qty" value="<?php echo $item['qty']; ?>" size="2" maxlength="3" /></td>
        <td>£<?php echo $item['qty'] * $item['price']; ?></td>  
        <td>£<?php echo $totalAll;?></td>
    </tr>
    <?php

    }
    ?>

solved I need help getting the grand total of a simple php cart using sessions [closed]