using session library in CodeIgniter
        Posted  
        
            by marcin_koss
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by marcin_koss
        
        
        
        Published on 2010-05-07T06:11:12Z
        Indexed on 
            2010/05/07
            6:18 UTC
        
        
        Read the original article
        Hit count: 284
        
codeigniter
|session
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?
© Stack Overflow or respective owner