首页 > 解决方案 > 从 stdClass 对象 TotalRecords 获取数据

问题描述

<?php
$codiceagente= 5429;
$elepag = 0;
$numpag = 0;
class DateTime2 extends DateTime {
    function __toString() { 
        return $this->format("Y-m-d");
    }
}
$wsdl_path = "http://89.46.71.117:8000/WILLeuro/services/anagrafe?wsdl";
$date = new DateTime2();
$client = new SoapClient($wsdl_path, array( 'soap_version'=>SOAP_1_1, 'trace'=>1));

$result = $client->RicercaPratiche(array('request' => array('NagIntProduttore' => $codiceagente, 'ElementiPerPagina' => $elepag, 'NumeroPagina' => $numpag, 'DataLavoro' => $date."")));

print_r($result);


?>

这是我的回应:

stdClass Object ( [RicercaPraticheResult] => [TotaleRecords] => 19 ) 

考虑到索引范围从0到,如何从各种记录中获取数据19

标签: phpsoaprequest

解决方案


推荐阅读