simple Xml object navigate issue

i have an xml obj like thid:

SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [id] => survey1_question01
            [num] => 01
            [text] => 1. What times will I take my 2 pills of Incivek (telaprevir) each day?
        )

    [response] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [dose1] => 08:00 AM
                    [dose2] => 12:02 PM
                    [dose3] => 08:00 PM
                )

        )

how can i navigate to [text] and [response] ?. the problem is $xmlTxt->results->question[1]->@attributes will not work . may be @ symbol is the reason how can i bypass this?

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories