|
Posted by Jerry Stuckle on November 11, 2008, 6:43 am
Please log in for more thread options
alexus wrote:
> fwrite(fopen('temp.xml','w+'),
> print_r(simplexml_load_string(curl_exec($test))),true);
>
> i for some reason get "1" inside of my temp.xml
simplexml doesn't cooperate with print_r() or var_dump().
Instead of doing all this in one statement, first fetch the string with
curl_exec() and ensure it worked OK. Then call simplexml_load_string().
Rather than using print_r(), iterate through the child elements. See
http://www.php.net/manual/en/function.simplexml-element-children.php for
an example on how to iterate the child nodes.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|