I am currently adding a feature to my site that allows me to obtain address details via a web service.? I am at the stage where I receive the information back in the form of a stdClass (see below).
I am having issues accessing this data? so I need someone with experience of STD classes to do this for me
This is what I need:
stdClass convert to an array
**If** ErrorNumber = 1;? Echo ErrorMessage;
? ? ? ? ? ? ? ? ? ? ? **Else**
**? ? ? ? Echo** [Line1]
**? ? ? ? Echo** [Line2]
? ? ? **? Echo** [Line3]
**? ? ? ? Echo** [Line4]
? ? ? ? **Echo** [Line5]
? ? ? ? **Echo** [PostTown]
? ? ? ? **Echo** [County]
? ? ? ? **Echo** [Postcode]
This is all that is required when that is done you will be paid in full. For someone who has worked with stdClass in the past this should take a matter of minuets.?
“stdClass Object ( [FastAddressResult] => stdClass Object ( [IsError] => [ErrorNumber] => 0 [ErrorMessage] => [Results] => stdClass Object ( [Address] => stdClass Object ( [Id] => 13872156.00 [OrganisationName] => [DepartmentName] => [Line1] => 21 Methley Grove [Line2] => [Line3] => [Line4] => [Line5] => [PostTown] => Leeds [County] => West Yorkshire [Postcode] => LS7 3PA [Mailsort] => 64121 [Barcode] => (LS73PA1R3) [IsResidential] => 1 [IsSmallOrganisation] => [IsLargeOrganisation] => [RawData] => stdClass Object ( ) [GeographicData] => stdClass Object ( [GridEastM] => 0 [GridNorthM] => 0 [Objective2] => [Transitional] => [Longitude] => 0 [Latitude] => 0 [WGS84Longitude] => 0 [WGS84Latitude] => 0 ) ) ) ) )??
If there is a error
“stdClass Object ( [FastAddressResult] => stdClass Object ( [IsError] => [ErrorNumber] => 1 [ErrorMessage] => get