getting array in place of xml string at any index in SalesForce Query Results - PHP Toolkit

Wednesday, July 9, 2014

I am trying to fetch data from salesforce using PHP Tookit .I got success in fetching record but now I am facing a problem that when I was getting result from query every time I was getting a string of containing xml tag,but now in few record I am getting array in place of string containing xml tag at any index of result like:-



[any] => Array([0] => <sf:Username>*******</sf:Username><sf:LastName>****</sf:LastName><sf:FirstName>****</sf:FirstName><sf:Name>******</sf:Name><sf:CompanyName>******</sf:CompanyName><sf:Division>*******</sf:Division><sf:Department>********</sf:Department><sf:Title>******</sf:Title><sf:Street>*****</sf:Street><sf:City xsi:nil="true"/><sf:State xsi:nil="true"/><sf:PostalCode>******</sf:PostalCode><sf:Country>*****</sf:Country><sf:Latitude xsi:nil="true"/><sf:Longitude xsi:nil="true"/>
[Address] => stdClass Object
(
[latitude] =>
[longitude] =>
[city] =>
[country] => ******
[countryCode] =>
[postalCode] => ******
[state] =>
[stateCode] =>
[street] => ********
)

[1] =>
<sf:Email>********</sf:Email> )


Now my question is Why this happen in few records while I am gettting simply string containing xml tag most of the record like:-



[any] =&gt; <sf:username>******</sf:username><sf:lastname>*****</sf:lastname><sf:firstname>*****</sf:firstname><sf:name>*****</sf:name><sf:companyname>******</sf:companyname><sf:division>******</sf:division><sf:department>*******</sf:department><sf:title>*******</sf:title><sf:street>*****</sf:street><sf:city xsi:nil="true"><sf:state xsi:nil="true"><sf:postalcode>*****</sf:postalcode><sf:country>*****</sf:country><sf:latitude xsi:nil="true"><sf:longitude xsi:nil="true">


Thanks for any help







http://ift.tt/1k5aqWS