Jump to content

[SOLVED] need help heting arrys & value strings from Object to work on php functions


Recommended Posts

Can someone help?

Need to get the data from this: $cart

 

only function i found sofar is just to show it :

print_r($cart);

 

 

the data inside $cart is:

 

shoppingCart Object
(
    [contents] => Array
        (
            [414] => Array
                (
                    [qty] => 1
                )

            [13] => Array
                (
                    [qty] => 1
                )

            [220] => Array
                (
                    [qty] => 2
                )

            [216] => Array
                (
                    [qty] => 1
                )

            [73] => Array
                (
                    [qty] => 1
                )

        )

    [total] => 20465
    [weight] => 0
    [cartID] => 43224
    [content_type] =>
)

 

 

Need to get the contents array and total , weight , cartID , content_type values out of there, so that i can use them in php functions, cose can't use $cart in allmost eany function.

 

Server:

PHP Version 5.2.1

System Windows NT USER-JQ7JTZE0T1 5.1 build 2600

Server API Apache 2.0 Handler

 

 

Tryed to get around the problem and get the data from some other channle but can't find, please help..

 

Thanks to all ahead foreany help  :(

Too easy, it wont let me off thehook..

 

Fatal error: Cannot use object of type shoppingCart as array in C:\Program Files\xampp\htdocs\s\sale24\test.php on line 55

 

Some function that help to get the array and the values out somehow.. :\ maybe ?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.