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: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to