I am new to PHP and new to DevNetwork. I am learning PHP and cannot figure out why this is the case.
Suppose you have a session:
Code: Select all
$_SESSION['cart'] = array();Code: Select all
$_SESSION['cart'][$product_id] = round($quantity, 0);but then I start playing around and change it to this:
Code: Select all
$temp_session = $_SESSION['cart'];
$temp_session[$product_id] = round($quantity,0);Thanks!!!!