Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php object to xml

<?php
$array = array('hello' => 'world', 'good' => 'morning');

$xml = simplexml_load_string("<?xml version='1.0' encoding='utf-8'?><foo />");
foreach ($array as $k=>$v) {
  $xml->addChild($k, $v);
}
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #object #xml
ADD COMMENT
Topic
Name
7+1 =