View Single Post
Old 01-30-2008, 01:38 PM   #2 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

Hi oMIKEo, welcome to TalkPHP

The problem with your code looks to be when you are trying to get the values from your $data array.

Your Amazon request only returns a single item so there is no need to specify [0] when accessing the item attributes.

For example, changing that block of your code to:

PHP Code:
$error $data['ItemLookupResponse']['Items']['Request']['Errors']['Error']['Message'];  
$theAuthor $data['ItemLookupResponse']['Items']['Item']['ItemAttributes']['Author'];  
$theLabel $data['ItemLookupResponse']['Items']['Item']['ItemAttributes']['Label'];  
$theBinding $data['ItemLookupResponse']['Items']['Item']['ItemAttributes']['Binding']; 
Will result in the following:

Code:
Author: Louis Fidge
Label: Letts Educational
Binding: Paperback
Hope that helps
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote