01-30-2008, 01:38 PM
|
#2 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
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 
|
|
|