Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Can't get ID of recommendations tv shows from themoviedb api

I want to get the IDs of recommend tv shows! But the json php has no function!

I want to get the IDs by following php example:

$url2 = file_get_contents("https://api.themoviedb.org/3/tv/1399/recommendations?api_key=XXXXXXXXXXX&language=de");
$json2 = json_decode($url2, true);
for($i=0; $i <= 18; $i++) {
    $tvidcompare = $json2['results'][$i]['genre_ids']['id'];
    echo $tvidcompare;
}

But I get nothing!

Comments