Skip to content

Instantly share code, notes, and snippets.

@jaredhoyt
Created July 7, 2010 18:22
Show Gist options
  • Save jaredhoyt/467050 to your computer and use it in GitHub Desktop.
Save jaredhoyt/467050 to your computer and use it in GitHub Desktop.
$array = array(
'Response' => array(
'OneKey' => 'foo',
'TwoKey' => array('bar', 'baz')
)
);
echo $xml->header();
echo $xml->serialize($array, array('format' => 'tags'));
<response>
<OneKey>foo</OneKey>
<two_key>bar</two_key>
<two_key>baz</two_key>
</response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment