Assume we have the array

$data = array( 
  array(
    'name'=>'John Q. Public',
    'userID'=>'l337d00d'
  ));
WDDX
Simple data enconding format, handles scalars, arrays/structures, date and time.

<wddxPacket version='1.0'>
  <header>
    <comment>results</comment>
  </header>
  <data>
    <array length='1'>
      <struct>
        <var name='name'>
          <string>John Q. Public</string>
        </var>
        <var name='userID'>
          <string>l337d00d</string>
        </var>
      </struct>
    </array>
  </data>
</wddxPacket>
... or use my own XML format
 <results>
  <timestamp>
   20040506-141030PST
  </timestamp>
  <data>
   <row>
    <field>
     <name>name</name>
     <value>John Q. Public</name>
    </field>
    <field>
      <name>userID</name>
      <value>l337d00d</value>
    </field>
   </row>
  </data>
 </results>