0

I am getting response from service as a simple xml object of form

Array
(
    [result] => Array
        (
            [0] => Array
                (
                    [link] => SimpleXMLElement Object
                        (
                            [0] => LINK
                        )

                    [snippet] => Teaser 
                    [fragment] => foo

I tried assigning this to a session variable, cache table(drupal) global variable , but am not able to get the actual object later, I get empty values or invalid object.

3
  • Could you show us the code you use to assign the above to a session variable. Have you called session_start()? Commented Apr 12, 2012 at 15:48
  • I am using drupal, so session_start() will be taken care of. Commented Apr 12, 2012 at 15:48
  • It is still necessary that you show us the relevant pieces of your code so we can help you. Commented Apr 12, 2012 at 15:52

1 Answer 1

1

You could try using serialize when assigning the xml variable to your session, then unserialize at the other end.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.