Hello,
I'm having an issue here and it seems so simple. My mind is just blank.
I have an array which I fill...
$_SESSION['cart'][]=array(
'quantity'=> $quantity,
'Name'=> $name,
'Cover'=> $style,
'UnitPrice'=> $price);
I has a for each loop which displays the array so i can make sure its doing what i need to.
for ($row = 0; $row < count($_SESSION['cart']); $row++)
{
echo "<li><b>The row number $row</b>";
echo "<ul>";
foreach($_SESSION['cart'][$row] as $key => $value)
{
echo "<li>".$value."</li>";
}
echo "</ul>";
echo "</li>";
}
My problem is, I want to store the following items in about array within the foreach loop.
$quantity,
$name,
$style,
$price
So the middle of my loop would be something like...
foreach($_SESSION['cart'][$row] as $key => $value) {
$Qty = something;
$Name = something;
$Style = something;
$Price = something;
// then display
}