note 85819 added to function.soap-soapclient-soapcall

From: Date: Fri, 19 Sep 2008 05:23:44 +0000
Subject: note 85819 added to function.soap-soapclient-soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-144533@lists.php.net to get a copy of this message
When I try to convert result to array I get "Cannot use object of type stdClass as array ..." so I use next: function toArray($obj){ $return=array(); if (is_array($obj)) { $keys=array_keys($obj); } elseif (is_object($obj)) { $keys=array_keys(get_object_vars($obj)); } else {return $obj;} foreach ($keys as $key) { $value=$obj->$key; if (is_array($obj)) { $return[$key]=toArray($obj[$key]); } else { $return[$key]=toArray($obj->$key); } } return $return; } ---- Server IP: 217.75.128.29 Probable Submitter: 62.213.161.157 ---- Manual Page -- http://www.php.net/manual/en/function.soap-soapclient-soapcall.php Edit -- https://master.php.net/note/edit/85819 Del: integrated -- https://master.php.net/note/delete/85819/integrated Del: useless -- https://master.php.net/note/delete/85819/useless Del: bad code -- https://master.php.net/note/delete/85819/bad+code Del: spam -- https://master.php.net/note/delete/85819/spam Del: non-english -- https://master.php.net/note/delete/85819/non-english Del: in docs -- https://master.php.net/note/delete/85819/in+docs Del: other reasons-- https://master.php.net/note/delete/85819 Reject -- https://master.php.net/note/reject/85819 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144533) next »