Before I begin, I know there are a bunch of questions similar to this, but trust me, I read all, if not most of them. I tried a bunch of solutions, but none of them seem to
The built in functions can do this.
$xml = new SimpleXMLElement(''); $arr = json_decode($your_array, true); array_walk_recursive($arr, array ($xml,'addChild'));