You are here: Re: PHP5 simplexml « PHP Programming Language « IT news, forums, messages
Re: PHP5 simplexml

Posted by elyob on 09/28/13 11:43

Hi all, I didn't get any replies on this unfoprtunately, but thought I'd
give a second go with an error from my apache log.

[Tue Mar 28 10:02:16 2006] [error] [client 127.0.0.1] PHP Warning:
simplexml_load_string() expects parameter 1 to be string, object given in
z:\\xmlrpc.php on line 34\n

So, how do I convert from an object to a string?!

<crosses fingers>
Thanks
</crosses fingers>
"elyob" <newsprofile@gmail.com> wrote in message
news:44233283$1@news1.homechoice.co.uk...
> Hi guys, I'm trying to output from an XML string and am having no luck.
> I'm using PHP5 here.
>
> If I print_r the array I get all the results plus extra text, but am
> unable to extract the individual response. Any pointers appreciated.
>
> Here's the code that shows the results...
>
> $get_all_value = $xmlrpc_resp->value();
> $albums_array = php_xmlrpc_decode($get_all_value);
> print $albums_array['string'];
>
> Here's the result string that I want to break up ...
>
> xmlrpcval Object
> (
> [me] => Array
> (
> [string] =>
> <photos page="1" pages="1" perpage="500" total="155">
> <photo id="114766115" owner="xxxxxx" secret="xxxxxx" server="50"
> title="Water Pump, Bushy Park" ispublic="1" isfriend="0" isfamily="0" />
> <photo id="114765757" owner="xxxxxx" secret="xxxxxx" server="36"
> title="Deer, Bushy Park" ispublic="1" isfriend="0" isfamily="0" />
> </photos>
>
> )
>
> [mytype] => 1
> [_php_class] =>
> )Many thanks
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация