按照下面的代码$client = new soapclient("http://xxxx/service.asmx?WSDL");
$param["Goodsno"]="XX";
$param["Inventoryno"]="";
$param["ColorName"]="";
$param["CmName"]="";
$param["BrandName"]="";
$res = $client->__Call('GetInventory',array('paramters'=>$param));
echo "<pre>";
print_r($res);
echo "<pre>";
打印出来的数据是
stdClass Object
(
[GetInventoryResult] => stdClass Object
(
[ArrayOfString] => Array
(
[0] => stdClass Object
(
[string] => Array
(
[0] => xx
[1] => xx
[2] => xx
[3] => xx
[4] => xx
) )
要怎么样才能解析出[0] => xx[1] => xx[2] => xx[3] => xx[4] => xx的值呢
我在$res = $client->__Call('GetInventory',array('paramters'=>$param));后面加->GetInventoryResult->string,返回的是NULL求助求助求助~~~~
$param["Goodsno"]="XX";
$param["Inventoryno"]="";
$param["ColorName"]="";
$param["CmName"]="";
$param["BrandName"]="";
$res = $client->__Call('GetInventory',array('paramters'=>$param));
echo "<pre>";
print_r($res);
echo "<pre>";
打印出来的数据是
stdClass Object
(
[GetInventoryResult] => stdClass Object
(
[ArrayOfString] => Array
(
[0] => stdClass Object
(
[string] => Array
(
[0] => xx
[1] => xx
[2] => xx
[3] => xx
[4] => xx
) )
要怎么样才能解析出[0] => xx[1] => xx[2] => xx[3] => xx[4] => xx的值呢
我在$res = $client->__Call('GetInventory',array('paramters'=>$param));后面加->GetInventoryResult->string,返回的是NULL求助求助求助~~~~
$res = (array)$client->__Call('GetInventory',array('paramters'=>$param));
print_r((array)$res[ArrayOfString][0]);