Parsing Amazon Web Services

$xml = aws_signed_request("com",
	"Operation" => "ItemSearch",
	"Type" => "Light",
	"SearchIndex" => "DVD",
	"Title" => $title,
	"ResponseGroup" => "Medium"

foreach($xml->Items->Item as $xml_item) {
	$xml_sm_img = $xml_item->SmallImage->URL;
	$xml_lg_img = $xml_item->largeImage->URL;

if I echo $xml_sm_img; I get the full URL: However, if I var dump it I get

object(SimpleXMLElement)#7 (1) { [0]=> string(60) "" }

How do I get this into a string so I can put it in a SESSION?

You can cast the SimpleXMLElement object to a string like so:

$xml_sm_img = (string) $xml_item->SmallImage->URL;

See: Converting to string in the manual.

Excellent! Thank you so much! :slight_smile: