[php] function call with XML attributes

The webservice I’m using requires a xml parameter with attributes.
Like this:

<test>
<user group="4" type="default">Max</user>
<birthday>1-2-1980</birthday>
</test>

So far I got:

$reqBody = array('test' => array(
                           'user' => 'Max',
                           'birthday'=>'1-2-1980'));

$result = $client->getUser($reqBody);

What will produce a soap body containing:

<test>
<user>Max</user>
<birthday>1-2-1980</birthday>
</test>

Only I’ve got no idea how to put in the attributes. Does anyone know? :frowning:

Without seeing function which creates the structure I can’t say what needs to be done here. Did you try nesting another array with attributes?