$test_array = array (
'bla' => 'blub',
'foo' => 'bar',
'another_array' => array (
'stack' => 'overflow',
),
);
$xml = new SimpleXMLElement('<root/>');
array_walk_recursive($test_array, array ($xml, 'addChild'));
$xmldata =$xml->asXML();
But its showing
fatal error:SimpleXMLElement' not found.
I used same thing in Magento 1.9 and it worked that time.