Jump to content

array2xml


aquadeluxe

Recommended Posts

I need to find a script that can create an xml output from my array. The array structure is

codelist
         name
         game
                0
                     name
                     gameid
                     cheat
                1
                     name
                     gameid
                     cheat

And I would want the output to be like:

<codelist>
   <name></name>
   <game>
        <name></name>
        <gameid></gameid>
        <cheat></cheat>
   </game>
   <game>
        <name></name>
        <gameid></gameid>
        <cheat></cheat>
   </game>
</codelist>

 

I've tried multiple scripts that I've found from phpclasses.com and none of them would output like this.

Link to comment
https://forums.phpfreaks.com/topic/102046-array2xml/
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.