RE: [PHP] PHP- accessing session var

From: Date: Thu, 14 Aug 2003 13:54:24 +0000
Subject: RE: [PHP] PHP- accessing session var
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-159576@lists.php.net to get a copy of this message
Ps i'm a girl On Thu, 2003-08-14 at 08:53, Mignon Hunter wrote: > Thanks Mike and Michael Smith. > > It works ! > > On Thu, 2003-08-14 at 05:57, Ford, Mike [LSS] wrote: > > On 13 August 2003 23:00, Mignon Hunter wrote: > > > > > Hi > > > > > > This will be real simple for you guys. When I print_r my session > > > vars part of what get is: > > > > > > [_SESSION] => Array > > > ( > > > [cart] => shoppingcart Object > > > ( > > > [contents] => Array > > > ( > > > [37] => Array > > > ( > > > [qty] => 1 > > > ) > > > > > > ) > > > > > > [total] => 70 > > > [weight] => 0 > > > [cartID] => > > > [content_type] => physical > > > ) > > > SO I'm trying to capture the total(70). I'm trying > > > $_SESSION['cart']['total'] > > > > > > But I'm not getting it. This is a multidimensional array isnt it ? -- > > > > No, it's a 1-dimensional array containing an Object of class shoppingcart, > > so you want: > > > > $_SESSION['cart']->total > > > > Cheers! > > > > Mike > > > > --------------------------------------------------------------------- > > Mike Ford, Electronic Information Services Adviser, > > Learning Support Services, Learning & Information Services, > > JG125, James Graham Building, Leeds Metropolitan University, > > Beckett Park, LEEDS, LS6 3QS, United Kingdom > > Email: m.ford@lmu.ac.uk > > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- Mignon Hunter Web Master and Developer Toshiba International 713.466.0277 x 3461

« previous php.general (#159576) next »