I got the following parameters as a response from SOAP client in which all the parameters have single values which is displaying properly and only the SerialEquipment parameter is an array and have many values and not able to display the result of this parameter. It just echoing as an Array.I am trying since long time but unable to display the result for SerialEquipment.
array result using var_dump:
array (size=4)
'Emission Badge' => int 4
'Car Tax' => float 146
'Tax Type' => string 'D' (length=1)
'SerialEquipment' =>
array (size=41)
0 =>
object(stdClass)[6]
public 'Code' => int 204093
public 'Desc_Short' => string 'Ablagefach mittig in Gep�?¤ckraumtrennwand;ESACO_UG(122)' (length=55)
public 'Desc_Long' => string 'Ablagefach mittig in Gep�?¤ckraumtrennwand inkl. verschiebbarem Haltenetz' (length=72)
1 =>
object(stdClass)[8]
public 'Code' => int 160452
public 'Desc_Short' => string 'Airbag f�?¼r Fahrer und Beifahrer, 2-stufi;ESACO_UG(103)' (length=55)
public 'Desc_Long' => string 'Airbag f�?¼r Fahrer und Beifahrer 2-stufig' (length=41)
Code:
function getVehicleValuation()
{
$result = $client->getVehicleValuation($params);
$return = array(
'Emission Badge' => $result->vehicle->Emission_Badge,
'Car Tax' => $result->vehicle->Car_Tax,
'Tax Type' => $result->vehicle->Tax_Type,
'SerialEquipment' => $result->vehicle->SerialEquipment
);
return $return;
}
Display result here:
if($parameter['aktion'] == 'getVehicle')
{
$returned_array=getVehicleValuation();
foreach($returned_array as $objects)
{
foreach($objects as $key => $obj)
{
echo "key.: " . $key . "<br>";
echo $obj->Code . "<br>";
echo $obj->Desc_Short . "<br>";
echo $obj->Desc_Long . "<br>";
}
}
}