Welcome Guest, Not a member yet? Register   Sign In
Multidimensional session data
#1

[eluser]spheroid[/eluser]
How is it possible to do the following refactored for CI? Having difficulty compared to the documentation:

1. Increase the value by 1
Code:
$_SESSION['cart_product_qty'][$i]++;

2. Compare a multidimensional session array key
Code:
if ($_SESSION['cart_product_id'][$i] == $product_id) ...

3. Set a session variable using an array key
Code:
$_SESSION['cart_product_qty'][] = 1;

4. Display a multidimensional session variable
Code:
echo $_SESSION['cart_product_qty'][$i];

I'm not sure if it's possible to use these type of multidimensional session variables??


Messages In This Thread
Multidimensional session data - by El Forum - 10-19-2007, 05:05 PM
Multidimensional session data - by El Forum - 10-20-2007, 08:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB