Home of web learners

www.webn3rd.com

PHP have library to work with xml

Lets start with an example:


          <?php
   $data 
"<?xml version = '1.0' encoding = 'UTF-8'?>
   
   <note>
      <name>roni</name>
      <ID>30</ID>
   </note>"
;
   
   
$xml simplexml_load_string($data);
   
print_r($xml);
?>

output:

SimpleXMLElement Object ( [name] => roni [ID] => 30 )

Here,you see that data converted into xml format

webn3rd.com

About webn3rd