I'm not able to get the content of this array, please can someone help?
Where Am I getting it wrong?
Below is the code
$barcode = "9780980200447";
function parseInfo($barcode) {
$url = "http://www.librarything.com/api_getdata.php?userid=timspalding&showstructure=1&max=10&showReviews=1&showTags=1&reviewsOnly=1&name=Jesus+is+Lord&&apikey=b27cb381baddff9c49b9dd27d9d96651&responseType=json";
$contents = file_get_contents($url);
$json = json_decode($contents, true);
return $json;
}
$array = (parseInfo($barcode));
//print_r($array);
foreach ($array as $values) {
echo $author_fl = $values['show']['showCovers'];
echo $book_id = $values['books'];
echo $title = $values['settings']['title'];
$covers = $values['settings']['covers']; // Author (last, first)
$author_lf = $values['settings']['author_lf']; // Author (last, first)
$author_fl = $values['settings']['author_fl']; // Author (first, last)
echo $author_code = $values['amazonchoice']['author_code'];
$ISBN = $values['amazonchoice']['ISBN'];
$publicationdate = $values['amazonchoice']['publicationdate'];
$entry_stamp = $values['amazonchoice']['entry_stamp'];
$entry_date = $values['amazonchoice']['entry_date'];
$copies = $values['amazonchoice']['copies'];
$notes = $values['amazonchoice']['notes'];
$language_main = $values['amazonchoice']['language_main'];
}
Thanks.