Ok, I have this statement, and it returns multiple items. I only want the first item.... foreach($response->Items->Item as $current){ print("<a href=".$current->DetailPageURL."><img src='images/watch.gif' align='center'/></a><br/>"); } Code (markup): I tried this with no luck.... foreach($response->Items->Item[1] as $current){ print("<a href=".$current->DetailPageURL."><img src='images/watch.gif' align='center'/></a><br/>"); } Code (markup):
foreach($response->Items->Item as $current){ print("<a href=".$current->DetailPageURL."><img src='images/watch.gif' align='center'/></a><br/>"); break; } PHP: break just interrupts whatever loop you are in.