I'm using the tmdb API to get some movie information ... I was able to do almost everything I need, what I can not get is the genres of movies > categories ... because the genres are within an object. This way:
I'mnotabletoaccessgenres->name
I'musingthiscodeinphptodecode:
$ch=curl_init();curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);curl_setopt($ch,CURLOPT_URL,"https://api.themoviedb.org/3/movie/".$_POST['numerofilme']."?api_key=minhaapiaquia&language=pt-BR&append_to_response=videos");
$result = curl_exec($ch);
curl_close($ch);
$obj = json_decode($result);
echo $obj->genres;
When I use $obj->genres
it apênas returns me a array
... if this code is not functional for what I need, please help me by commenting on how I can get the categories ...