For some reason I'm heaving a tough time understanding how sessions in CI work. I would like to change the following part of the code to use CodeIgniter sessions rather than the way it's normally done in PHP. What would be the best way to do it?
foreach($_POST['qty'] as $k => $v) { $id = (int)$k; $qty = (int)$v;
$_SESSION['cart'][$id]['quantity'] = $qty;
}
Another question! While using CI session library, when a session has multidimensional structure, do I always have to drop session's content to an array first, before I can read the values I need?