I'm using two session variables $_SESSION[$sku] where $sku is retrieving something from a database
and $_SESSION[$price].
To display the contents of $_SESSION[$sku] i HAVE to use a foreach loop consisting of the following:
Code: Select all
foreach($_SESSION as $key=>$value){
echo "<tr><td>$value</td><td>$key</td><td></td>";
echo "<td>$_SESSION[$price]</td><td></td>";
}Code: Select all
quantity sku price total
10 ipod_sock 12.00 120.00
Code: Select all
quantity sku price total
10 ipod_sock 12.00 120.00
12.00 12.00 12.00anyone know how I can go about doing this? I'm REALLY confused.Warning: Invalid argument supplied for foreach() in /home/users2/quinntk/public_html/morning/store/ShoppingCart.php on line 24