Jump to content

Help with xml data parse


kucing

Recommended Posts

Hi there,

 

Here is the xmy data which I want to convert into array any help will be very appreciated.

 

	<userinfo>
<user>test</user>
<age>24</age>
<country>japan</country>
<city>heaven</city>
</userinfo>

 

into

 

Array
(
    [0] => Array
        (
            [0] => user="test"
            [1] => age="24"
            [2] => country="japan"
            [3] => city="heaven"
        )

    [1] => Array
        (
            [0] => user
            [1] => age
            [2] => country
            [3] => city
        )

    [2] => Array
        (
            [0] => test
            [1] => 24
            [2] => japan
            [3] => heaven
        )

)

 

Thanks  :)

Link to comment
https://forums.phpfreaks.com/topic/112571-help-with-xml-data-parse/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.