Skip to content

Instantly share code, notes, and snippets.

@entomb
entomb / php_arrayToXml.php
Created October 8, 2013 01:33
Parses an Array to XML, allows for multiple items with the same key, as long as the parent node is a collection. Useful for those nasty SOAP webservices with auto generated and poor WSDL
<?php
$request = array(
'Test' => array(
'innerTest' => array(
'innerInnerTest' => array(
'someVar' => 'ABCabcXYZxyz',
'arrayVar' => array(
'someString' => 'loremipsum',
'someInt' => 123123123,