Re: StdClass Object returned from __soapCall???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 6 Jul 2006, Vandegrift, Ken wrote:

> Just wanted to check if anybody knows why the return values from a web
> service I am connecting with returns response values as a stdClass
> object instead of an associative array like I was expecting?

An object with only public properties and no methods is pretty much
the same thing as an array in PHP. You should be able to iterate over
it, etc.

However, if you prefer it as an array, typecast it:

$array = (array) $object;

-adam

-- 
adam@trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux