Need help on a call returned in XML

Discussion in 'PHP' started by tyler_durden, Sep 11, 2010.

  1. #1
    I am doing a simple API call and data is being returned in an xml format. I am just learning XML and PHP, so I am starting with a sample script already written and modifying that to my needs. There are probably 60 different fields being returned, bu tthis example code only shows a few selected fields. I just want a dump or list of EVERYTHING returned by the

    // If the response was loaded, parse it and build links
        $title = $resp->Item->Title;
        $results .= "ItemID : " . $resp->Item->ItemID . "<br/>\n";
        $results .= "<img src=\"" . $resp->Item->GalleryURL . "\">\n";
    }
    
    <?php echo $results;?>
    Code (markup):
    What do I change to just output everything? Thanks.
     
    tyler_durden, Sep 11, 2010 IP
  2. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #2

    A bit new to it myself but check the following link has good information and example.
    http://stackoverflow.com/questions/1259026/php-print-xml-data-returned-from-api-call-failed
     
    lowridertj, Sep 11, 2010 IP