I have a simple xml object like this as a result of Zend_Rest_Client_Result Object.
<userdetails>
<name value="jake"/>
<type value="user"/>
<attribute name="fname">
<value>Jake</value>
</attribute>
<attribute name="lname">
<value>Gordon</value>
</attribute>
<attribute name="phone">
<value>123-555-1234</value>
<value>999-888-7777</value>
</attribute>
</userdetails>
How can I create an array like this from the above XML object using PHP?
$userDetails = array();
$userDetails["name"] = "jake";
$userDetails["type"] = "user";
$userDetails["fname"] = "Jake";
$userDetails["lname"] = "Gordon";
$userDetails["phone"][0] = "123-555-1234";
$userDetails["phone"][1] = "123-555-1234";
Thanks,