How to access this object inside this array?

I the following array, I am trying to access the “total_price” key. How is it done?

Thank you.


Array ( [wpsc_selected_country] => US [wpsc_delivery_country] => US [wpsc_selected_region] => 51 [wpsc_delivery_region] => 51 [wpsc_cart] => wpsc_cart Object ( [delivery_country] => US [selected_country] => US [delivery_region] => 51 [selected_region] => 51 [selected_shipping_method] => [selected_shipping_option] => [selected_shipping_amount] => [coupon] => [tax_percentage] => 0 [unique_id] => f6a8311bdb7d79fc6bba6a9f4a74733a8523fec6 [errors] => Array ( ) [total_tax] => 0 [base_shipping] => 0 [total_item_shipping] => 0 [total_shipping] => [subtotal] => 49.95 [total_price] => 49.95 [uses_shipping] => [is_incomplete] => 1 [cart_items] => ......

That depends on the wpsc_cart class but perhaps something along the lines of:

$total_price = $array['wpsc_cart']->total_price;


$array['wpsc_cart']->total_price

:slight_smile:

Thanks a lot guys. Saved me a lot of time.