PHP calls WebService. could you please take a look at it ~
'1','outCount'=>'10');$ret = $client->LatestNews($param);if($ret->return){ print_r($ret->return);}else{ echo 'no user';}?>
What's wrong with simple Webservice calls? Thank you for your guidance ~
Reply to discussion (solution)
Anyone? online.
Print_r ($ ret );
Get
StdClass Object
(
[LatestNewsResult] => stdClass Object
(
[InheritanceNews] => Array
(
[0] => stdClass Object
(
[Url] => http://pica.chalwin.com/cpzx/2013/278.html
[NewsCount] => 0
[Author] => larry
[Title] => website construction process
[NewsId] = & gt; 278
[PublishTime] => 2013-04-16T13: 34: 57
)
.....
No return member
Print_r ($ ret );
Get
StdClass Object
(
[LatestNewsResult] => stdClass Object
(
[InheritanceNews] => Array
(
[0] => stdClass Object
(
[Url] => http://pica.chalwin.com/cpzx/2013/278.html
[NewsCount] => 0
[Author] => larry
[Title] => website construction process
[NewsId] = & gt; 278
[PublishTime] => 2013-04-16T13: 34: 57
)
.....
No return member
So how can I output everything? It's not the set to output ~ Ah.
Anyone? online.
Is how to bind it to a table
$ Ret-> LatestNewsResult-> InheritanceNews is a subscript array.
Should this array be traversed?
foreach($ret->LatestNewsResult->InheritanceNews as $item) { foreach($item as $k=>$v) { echo "$k : $v\n"; }}
foreach($ret->LatestNewsResult->InheritanceNews as $item) { foreach($item as $k=>$v) { echo "$k : $v\n"; }}
Thanks, the results are Output. I will beautify others myself.