So I'm trying to convert an array to an XML document (just outputting it as a string). I know php has json_encode built in and it works fine, but I can't seem to find any good XML equivalents.
Basically, the array is the result of a PDOStatement->fetchAll();
I'd like the output to look like this:
<arrayitem>
<iteminfo1>text</iteminfo1>
<iteminfo2>text</iteminfo2>
<iteminfo3>text</iteminfo3>
<iteminfo4>text</iteminfo4>
<iteminfo5>text</iteminfo5>
</arrayitem>