-1

I have a data set which looks like this

  Name  Age

  A     10
  B     20
  C     30

i want to convert the given data into following xml format in php

<?xml version="1.0" encoding="utf-8"?>
<parent>
<child name="A" age="10" />
<child name="B" age="20" />
<child name="C" age="30" />
</parent>
jan5
  • 1,109
  • 3
  • 16
  • 28

1 Answers1

-1

Check out this post - How to convert array to SimpleXML

Community
  • 1
  • 1
Uday Sawant
  • 5,581
  • 3
  • 31
  • 44