how to convert php array to xml



I have php array like below



$row = array (
'name' => 'david',
'bio' => 'good man'
);


i want to convert this array to corresponding XML page like scenario below.



<?xml version="1.0" encoding="UTF-8"?>
<note>
<name>david</name>
<bio>good man</bio>
</note>


anybody please help me to getting a correct solution.


thanks


No comments:

Post a Comment